/* Shared shell, loaded on every public page, after the page-specific CSS. */
.portal-shell{--portal-mint:#94cfb7;--portal-accent:#25886c;--portal-soft:color-mix(in srgb,var(--text) 4%,transparent)}
.portal-shell nav.portal-nav{position:static;inset:auto;display:flex;flex-direction:row;flex-wrap:nowrap;width:100%;max-width:100%;min-width:0;height:auto;gap:0;padding:0;margin:12px 0 26px;background:transparent;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;z-index:auto;white-space:nowrap;letter-spacing:normal}
.portal-shell nav.portal-nav>a{flex:none;display:block;padding:14px 16px;font:13px/1.6 Arial,Helvetica,sans-serif;color:var(--muted);background:transparent;border:0;border-bottom:2px solid transparent;border-radius:0;touch-action:manipulation}
.portal-shell nav.portal-nav>a:hover,.portal-shell nav.portal-nav>a[aria-current=page]{color:var(--text);background:var(--portal-soft);border-bottom-color:#3d9f7a}.portal-shell nav.portal-nav>a:after{display:none}
.portal-shell .section-banner{position:relative;isolation:isolate;overflow:hidden;border:1px solid var(--line);border-radius:9px;padding:35px 32px;margin:24px 0 30px;min-height:220px;background:linear-gradient(90deg,#101614ed 0%,#101614d9 38%,#10161440 100%),var(--section-art) center 52%/cover;color:#eee8e5}
.portal-shell .section-banner h1{color:#f2ece5;font:normal clamp(32px,4vw,46px)/1.15 Georgia,serif;margin:13px 0 18px;max-width:760px}.portal-shell .section-banner h1 em{color:#a3d6bf}.portal-shell .section-banner .eyebrow,.portal-shell .section-banner .portal-kicker{color:#d3b182}.portal-shell .section-banner p:not(.eyebrow):not(.portal-kicker){color:#c6c6be;max-width:650px;font-size:14px;line-height:1.8}.portal-shell .section-banner .portal-tag{display:none}.portal-shell .section-banner.guide-hero{grid-template-columns:1fr 100px}.portal-shell .section-banner .guide-hero-art{display:none}
body[data-section=news]{--section-art:url('/assets/sections/news-v1.webp')}body[data-section=tools]{--section-art:url('/assets/sections/tools-v1.webp')}body[data-section=calculators]{--section-art:url('/assets/sections/calculators-v1.webp')}body[data-section=worlds]{--section-art:url('/assets/sections/worlds-v1.webp')}body[data-section=houses]{--section-art:url('/assets/sections/houses-v1.webp')}body[data-section=statistics]{--section-art:url('/assets/sections/statistics-v1.webp')}
.portal-home .portal-shortcuts{position:relative;isolation:isolate;overflow:hidden}.portal-home .portal-shortcuts:before{content:'';position:absolute;inset:0;background:linear-gradient(#121714c9,#121714ee),url('/assets/sections/tools-v1.webp') right center/cover;z-index:-1}.portal-home .portal-shortcuts h2,.portal-home .portal-shortcuts a{color:#e8e9e2}.portal-home .portal-shortcuts .portal-kicker{color:#d3b182}
.portal-home .tibia-news-card{overflow:hidden}.portal-home .tibia-news-card .news-thumb{display:block;width:calc(100% + 40px);height:130px;object-fit:cover;object-position:70% 50%;margin:-20px -20px 0;filter:saturate(.85)}
.portal-home .tibia-news-card[data-art=news]{--news-art:url('/assets/sections/news-v1.webp')}.portal-home .tibia-news-card[data-art=tools]{--news-art:url('/assets/sections/tools-v1.webp')}.portal-home .tibia-news-card[data-art=worlds]{--news-art:url('/assets/sections/worlds-v1.webp')}.portal-home .tibia-news-card[data-art=houses]{--news-art:url('/assets/sections/houses-v1.webp')}.portal-home .tibia-news-card[data-art=statistics]{--news-art:url('/assets/sections/statistics-v1.webp')}
.portal-home .tibia-news-card:first-child{background:linear-gradient(90deg,#101713e8,#11191455),var(--news-art,url('/assets/sections/news-v1.webp')) center/cover}.portal-home .tibia-news-card:first-child .news-thumb{display:none}
.portal-shell.atlas-workspace .atlas-layout{height:calc(100svh - var(--atlas-site-header,100px) - 95px)}
html[data-theme=light] .portal-shell{--portal-mint:#246f57}
html[data-theme=light] body.portal-shell .section-banner{background:linear-gradient(90deg,#101614ed 0%,#101614d9 38%,#10161440 100%),var(--section-art) center 52%/cover;color:#eee8e5}html[data-theme=light] body.portal-shell .section-banner h1{color:#f2ece5}html[data-theme=light] body.portal-shell .section-banner h1 em{color:#a3d6bf}html[data-theme=light] body.portal-shell .section-banner p:not(.eyebrow):not(.portal-kicker){color:#c6c6be}
@media(max-width:680px){
 .portal-shell nav.portal-nav{margin:6px 0 21px}.portal-shell nav.portal-nav>a{padding:12px 13px;font-size:12px}
 .portal-shell .section-banner{padding:26px 20px;min-height:220px;background-position:65% 50%}.portal-shell .section-banner h1{font-size:33px;line-height:1.18;letter-spacing:-.5px}.portal-shell .section-banner p:not(.eyebrow):not(.portal-kicker){font-size:13px}.portal-shell .section-banner.guide-hero{grid-template-columns:1fr}
 .portal-home .tibia-news-card .news-thumb{width:calc(100% + 32px);margin:-16px -16px 0;height:105px}
 .worlds-responsive-table{border:0;overflow:visible}.worlds-responsive-table table,.worlds-responsive-table tbody{display:block;width:100%}.worlds-responsive-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
 .worlds-responsive-table tbody{display:grid;gap:12px}.worlds-responsive-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'name players' 'status region' 'pvp pvp';gap:12px 14px;border:1px solid var(--line);border-radius:8px;background:var(--portal-surface,var(--panel));padding:17px;min-width:0}
 .worlds-responsive-table tbody td{display:block;border:0;padding:0;min-width:0!important;white-space:normal!important;overflow-wrap:anywhere;font-size:13px}.worlds-responsive-table tr:hover td{background:transparent}
 .worlds-responsive-table td:nth-child(1){grid-area:name;align-self:center;font:23px Georgia}.worlds-responsive-table td:nth-child(1) a{display:block;padding:5px 0}
 .worlds-responsive-table td:nth-child(2){grid-area:status;align-self:center}.worlds-responsive-table td:nth-child(3){grid-area:players;text-align:right;font:25px/1.2 Georgia}.worlds-responsive-table td:nth-child(3):before{content:attr(data-label);display:block;font:10px/1.5 Arial;color:var(--muted);margin-bottom:4px}
 .worlds-responsive-table td:nth-child(4){grid-area:region;text-align:right;color:var(--muted)}.worlds-responsive-table td:nth-child(5){grid-area:pvp;border-top:1px solid var(--line);padding-top:11px;color:var(--muted);font-size:12px}.worlds-responsive-table td:nth-child(5):before{content:'PvP · ';color:var(--text)}
 .portal-shell .portal-summary{gap:8px}.portal-shell .portal-summary>div{padding:12px 9px}.portal-shell .portal-summary strong{font-size:24px}.portal-shell .portal-summary small{font-size:10px;line-height:1.5;overflow-wrap:anywhere}
}
@media(prefers-reduced-motion:reduce){.portal-nav{scroll-behavior:auto}}
/* Keep the sidebar aligned with both edges of the news column. */
@media(min-width:681px){
 .portal-home .portal-columns{align-items:stretch}
 .portal-home .portal-aside{display:grid;grid-template-rows:auto minmax(min-content,1fr) auto}
 .portal-home .portal-shortcuts{display:flex;flex-direction:column}
 .portal-home .portal-shortcuts>a{flex:1;min-height:50px}
}

/* Compact density: reduce chrome, not browser zoom or the map scale. */
.portal-shell .header{height:82px;gap:20px}
.portal-shell .portal-panel,.portal-shell .calc-panel{padding:18px}
.portal-shell .portal-panel h2{font-size:22px;margin-bottom:14px}
.portal-shell .portal-heading{margin:22px 0}
.portal-shell .portal-heading h1{font-size:clamp(28px,3.4vw,39px)}
.portal-shell .section-banner{min-height:180px;padding:26px;margin:18px 0 24px}
.portal-shell .section-banner h1{font-size:clamp(29px,3.5vw,40px);margin:10px 0 12px}
.portal-shell .tiles{gap:12px}
.portal-shell .tile{padding:18px}
.portal-shell .portal-summary{gap:10px;margin:18px 0}
.portal-shell .portal-summary>div{padding:12px 16px}
.portal-shell .portal-table td,.portal-shell .portal-table th{padding:10px 13px}
.portal-shell .portal-controls{gap:10px;margin-bottom:16px}
.portal-shell .calc-panel h2{margin-bottom:18px}
.portal-shell .calc-panel label{margin-bottom:16px}
.portal-shell .calc-panel input[type=number]{padding:11px 12px;font-size:18px}
.portal-shell .eq-heading{margin:20px 0}
.portal-shell .eq-heading h1{font-size:clamp(30px,3.4vw,42px)}
.portal-shell .eq-box{padding:15px;border-radius:9px}
.portal-shell .eq-box h2{font-size:21px}
.portal-shell .eq-layout{gap:14px}
.portal-shell .eq-doll{grid-template-rows:repeat(4,82px);margin:15px 0 12px}
.portal-shell .eq-item{padding:10px 0}
.portal-shell nav.portal-nav{margin:8px 0 20px}
.portal-shell nav.portal-nav>a{padding:11px 14px}
.portal-home .portal-columns{gap:22px;grid-template-columns:minmax(0,1fr) 270px}
.portal-home .portal-news-column{min-width:0}
.portal-home .home-news{padding-top:0}
.portal-home .home-news>.section-title{height:35px;min-height:35px;margin-bottom:12px}
.portal-home .home-news .section-title h2{font-size:24px}
.portal-home .tibia-news-grid{gap:10px}
.portal-home .tibia-news-card{min-height:112px;padding:16px;gap:12px}
.portal-home .tibia-news-card h3{font-size:18px}
.portal-home .tibia-news-card:first-child{min-height:235px;padding:24px}
.portal-home .tibia-news-card:first-child h3{font-size:29px}
.portal-home .portal-aside{gap:14px}
.portal-home .portal-aside .portal-panel{padding:17px}
.portal-home .portal-aside .portal-panel h2{font-size:22px}
.portal-home .portal-world-state{margin-top:12px}
.portal-home .portal-world-state strong{font-size:28px}
.portal-home .portal-world-links{gap:6px;margin-top:12px}
.portal-home .portal-shortcuts>a{min-height:42px;padding:10px 0;font-size:12px}
.portal-home .portal-compact-link{font-size:12px;padding:11px 0}
.portal-home .portal-feature{margin-top:16px;padding:16px 0;gap:14px}
.portal-home .portal-feature h2{font-size:22px}
@media(min-width:681px){.portal-home .portal-aside{padding-top:47px;grid-template-rows:auto minmax(min-content,1fr) auto}}
.portal-home .portal-aside select{min-height:40px;padding:8px 10px;font-size:14px}
/* Navigation and atlas use exactly the same outer frame. */
.portal-shell.atlas-workspace .atlas-page{max-width:1920px;padding:8px 20px 12px}
.portal-shell.atlas-workspace nav.portal-nav{width:100%;margin:0 0 12px;padding:0;background:var(--bg);border:1px solid var(--line);border-radius:8px;overflow-y:hidden;isolation:isolate}
.portal-shell.atlas-workspace nav.portal-nav>a{padding:10px 15px}
.portal-shell.atlas-workspace .atlas-layout{height:calc(100svh - var(--atlas-site-header,82px) - var(--atlas-site-nav,56px) - 20px)}
@media(max-width:680px){
 .portal-shell .header{height:72px;gap:12px}
 .portal-shell .portal-panel,.portal-shell .calc-panel{padding:15px}
 .portal-shell .eq-doll{max-width:310px;margin:14px auto;grid-template-rows:repeat(4,76px)}
 .portal-shell .section-banner{padding:21px 18px;min-height:170px}
 .portal-shell .tile{padding:15px}
 .portal-home .portal-columns{grid-template-columns:1fr;gap:18px}
 .portal-home .portal-aside{padding-top:0;display:flex}
 .portal-home .tibia-news-card{min-height:115px;padding:14px}
 .portal-home .tibia-news-card h3{font-size:17px}
 .portal-home .tibia-news-card:first-child{min-height:215px;padding:20px}
 .portal-home .tibia-news-card:first-child h3{font-size:25px}
 .portal-shell.atlas-workspace .atlas-page{padding:6px 10px 10px}
 .portal-shell.atlas-workspace nav.portal-nav{margin-bottom:8px;border-radius:7px}
 .portal-shell.atlas-workspace nav.portal-nav>a{padding:10px 12px;min-height:44px}
 /* Preserve readable inputs and prevent Safari focus zoom. */
 .portal-shell input:not([type=checkbox]):not([type=radio]),.portal-shell select,.portal-shell textarea{font-size:16px}
}

/* Dense cards throughout the public portal, including calculator outputs. */
.portal-shell .exercise-form,.portal-shell .exercise-best,.portal-shell .exercise-sources{padding:16px;margin-bottom:14px}
.portal-shell .exercise-fields{gap:12px}
.portal-shell .exercise-fields label,.portal-shell .exercise-bonuses label{gap:6px;font-size:12px}
.portal-shell .exercise-form input[type=number],.portal-shell .exercise-form select{min-height:40px;padding:8px 10px}
.portal-shell .exercise-bonuses{gap:16px;margin-top:14px}
.portal-shell .exercise-note{font-size:12px;line-height:1.6;margin:12px 0}
.portal-shell .exercise-metrics,.portal-shell .exercise-options{gap:10px;margin:14px 0}
.portal-shell .exercise-metrics>.panel,.portal-shell .exercise-option{padding:14px;min-width:0;border-radius:7px}
.portal-shell .exercise-metrics span{font-size:12px;line-height:1.4}
.portal-shell .exercise-metrics strong{font-size:22px;line-height:1.3;margin-top:7px}
.portal-shell .exercise-best h2{font-size:21px;line-height:1.4;margin:10px 0}
.portal-shell .exercise-best p:not(.eyebrow){font-size:12px;line-height:1.6;margin:9px 0;overflow-wrap:anywhere}
.portal-shell .exercise-best .eyebrow{font-size:10px;letter-spacing:1.3px;margin:0}
.portal-shell .exercise-item-icon{width:32px;height:32px}
.portal-shell .exercise-skill-icon{width:30px;height:30px}
.portal-shell .exercise-option h3{font-size:19px;gap:8px;margin:0 0 10px}
.portal-shell .exercise-option strong{font-size:25px;line-height:1.3;overflow-wrap:anywhere}
.portal-shell .exercise-option p,.portal-shell .exercise-option small{font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.portal-shell .exercise-option p{margin:7px 0}
.portal-shell .exercise-compare{font-size:23px;margin-top:22px}
.portal-shell .results{margin-top:16px;padding:18px}
.portal-shell .results h2{font-size:23px;margin:8px 0 16px}
.portal-shell .result-grid{gap:14px}
.portal-shell .result-grid strong{font-size:23px;margin:6px 0;line-height:1.3}
.portal-shell .range-result{padding:16px 10px;margin-top:16px}
.portal-shell .range-result strong{font-size:28px;margin:8px 0}
.portal-shell .profile-stats{gap:10px;margin:14px 0}
.portal-shell .profile-stats>div,.portal-shell .loot-summary>div{padding:14px}
.portal-shell .profile-stats strong,.portal-shell .loot-summary strong{font-size:22px;margin-top:6px;line-height:1.3}
.portal-shell .tracked-card{padding:15px}
.portal-shell .tracker-list{gap:10px}
.portal-shell .hunt-stats{gap:8px;margin:14px 0}
.portal-shell .hunt-stats>div{padding:11px;gap:5px}
.portal-shell .hunt-stats strong{font-size:20px}
.portal-shell .stamina-current{font-size:38px;margin:8px 0 16px}
.portal-shell .stamina-wait{font-size:30px;margin:16px 0 8px}
@media(min-width:901px){
 .portal-shell>header>.wrap.header{width:100%;max-width:none;padding-inline:28px}
 .portal-shell>header .brand{gap:15px;margin-right:auto}
 .portal-shell>header .site-controls{margin-left:auto}
}
@media(max-width:700px){
 .portal-shell .exercise-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
 .portal-shell .exercise-metrics>.panel:first-child{grid-column:1/-1}
 .portal-shell .exercise-metrics>.panel{padding:12px}
 .portal-shell .exercise-metrics strong{font-size:20px;margin-top:5px}
 .portal-shell .exercise-metrics>.panel:first-child{display:flex;align-items:center;justify-content:space-between;gap:12px}
 .portal-shell .exercise-metrics>.panel:first-child strong{margin:0;text-align:right}
 .portal-shell .exercise-options{grid-template-columns:repeat(2,minmax(0,1fr))}
 .portal-shell .exercise-option{display:block;padding:12px}
 .portal-shell .exercise-option h3{font-size:17px}
 .portal-shell .exercise-option strong{font-size:21px}
 .portal-shell .exercise-option p,.portal-shell .exercise-option small{font-size:11px}
 .portal-shell .exercise-option .exercise-item-icon{width:28px;height:28px}
 .portal-shell .exercise-best h2{font-size:20px;gap:7px}
 .portal-shell .exercise-best #ex-mix .exercise-item-icon{width:28px;height:28px}
 .portal-shell .result-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .portal-shell .result-grid>div{padding-left:10px;min-width:0}
 .portal-shell .result-grid strong{font-size:21px}
 .portal-shell .profile-stats>div,.portal-shell .loot-summary>div{padding:11px}
 .portal-shell .profile-stats strong,.portal-shell .loot-summary strong{font-size:20px}
}
@media(max-width:360px){
 .portal-shell .exercise-metrics strong{font-size:18px}
}


/* Shared directory cards on the calculators, tools, games and guides pages. */
.portal-shell .directory-page{
  min-height:0;
  padding-bottom:clamp(32px,6vw,64px);
}
.portal-shell .calculator-list{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.portal-shell .compact-tool-card{
  grid-template-columns:32px minmax(0,1fr);
  grid-template-rows:minmax(0,1fr) auto;
  align-items:start;
  padding:16px;
  gap:12px;
}
.portal-shell .compact-tool-card:hover{transform:none}
.portal-shell .compact-tool-card>.tile-icon{
  display:grid;
  place-items:start center;
  width:32px;
  height:32px;
  max-width:100%;
}
.portal-shell .compact-tool-card>.tile-icon img{
  width:100%;
  height:100%;
  object-fit:contain;
  image-rendering:pixelated;
}
.portal-shell .compact-tool-card>.tool-card-copy{grid-area:1 / 2}
.portal-shell .compact-tool-card .tool-card-heading{
  display:grid;
  justify-items:start;
  gap:5px;
}
.portal-shell .compact-tool-card .tile-title{font-size:20px;line-height:1.2;font-weight:400}
.portal-shell .compact-tool-card>.primary{
  grid-area:2 / 1 / 3 / -1;
  align-self:end;
  justify-content:center;
  width:100%;
  min-height:44px;
  margin:0;
  padding:9px 8px;
  text-align:center;
  white-space:normal;
  font-size:12px;
}
@media(max-width:700px){
  .portal-shell .calculator-list{gap:10px}
  .portal-shell .compact-tool-card{
    grid-template-columns:24px minmax(0,1fr);
    padding:12px;
    gap:9px;
  }
  .portal-shell .compact-tool-card>.tile-icon{width:24px;height:24px}
  .portal-shell .compact-tool-card .tile-title{font-size:17px;min-height:2.4em}
  .portal-shell .compact-tool-card p{font-size:11px;line-height:1.55}
  .portal-shell .compact-tool-card>.primary{font-size:11px}
}
@media(max-width:350px){
  .portal-shell .header{gap:6px}
  .portal-shell .calculator-list{grid-template-columns:minmax(0,1fr)}
  .portal-shell .compact-tool-card .tile-title{min-height:0}
}
