/* V18: viewport-safe layout, high contrast and compact affiliate banners. */
:root{
  --v18-ink:#082f3c;
  --v18-text:#244b57;
  --v18-muted:#4f6d76;
  --v18-link:#006882;
  --v18-line:#c9dfe5;
  --v18-soft:#f5fafc;
  --v18-pale:#eaf7fa;
}
html,body{width:100%;max-width:100%;margin:0;overflow-x:hidden!important}
body *{box-sizing:border-box;min-width:0}
img,svg,video,canvas,iframe{max-width:100%;height:auto}
p,li,dd,dt,th,td,a,button,label,span,strong,b,small,h1,h2,h3,h4{overflow-wrap:anywhere;word-break:keep-all}
.quality-v7 .container,.home-premium .container{max-width:1180px;width:min(100% - 32px,1180px)}
.quality-v7 p,.quality-v7 li,.home-premium p,.home-premium li{color:var(--v18-text)}
.quality-v7 .muted,.home-premium .muted,.quality-v7 small,.home-premium small{color:var(--v18-muted)}
.quality-v7 a:not(.btn),.home-premium a:not(.btn){text-decoration-thickness:1px;text-underline-offset:2px}

/* Avoid hidden content that only appears after horizontal dragging. */
.main-nav .container,.archive-tabs,.qna-filter-row,.hero-keywords,.search-chips,.dashboard-tabs,.nifs-tabs,.windy-layers,.chart-switch,.all-tabs,.chart-buttons,.skills-jump{
  max-width:100%;
}
.archive-tabs,.qna-filter-row,.hero-keywords,.search-chips,.dashboard-tabs,.nifs-tabs,.windy-layers,.chart-switch,.all-tabs,.chart-buttons{
  flex-wrap:wrap!important;overflow:visible!important;overflow-x:visible!important;scroll-snap-type:none!important;
}
.archive-tabs button,.qna-filter-row button,.hero-keywords button,.search-chips button,.dashboard-tabs button,.nifs-tabs button,.windy-layers button,.chart-switch button,.all-tabs button,.chart-buttons button{
  white-space:normal!important;max-width:100%;
}
.luxe-route small,.editorial-link small,.topic-link span,.qna-category-tile small,.spot-result-item p{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;color:var(--v18-muted)!important}
.luxe-route div,.editorial-shell,.topic-grid,.home-qna-list a,.archive-card,.quality-card,.card{min-width:0!important;max-width:100%!important}

/* Compact disclosure. */
.affiliate-top-disclosure{background:#f8fbfc!important;border-color:#d8e7eb!important;color:#46636c!important;font-size:10px!important;line-height:1.25!important}
.affiliate-top-disclosure .container{padding-top:4px!important;padding-bottom:4px!important}

/* AdPick placement sized like a small display banner, not a content block. */
.affiliate-recommendations,.affiliate-placement-top,.affiliate-placement-bottom{
  padding:3px 0 4px!important;margin:0!important;background:#fbfdfe!important;border-top:1px solid #dbe9ed!important;border-bottom:1px solid #dbe9ed!important;
}
.affiliate-placement-bottom{background:#fff!important}
.affiliate-shell{width:min(100% - 28px,970px)!important;max-width:970px!important;margin:0 auto!important}
.affiliate-head{display:flex!important;align-items:center!important;gap:6px!important;margin:0 0 2px!important;min-height:0!important}
.affiliate-kicker,.affiliate-head p,.affiliate-disclosure{display:none!important}
.affiliate-head h2,.affiliate-placement-top .affiliate-head h2{margin:0!important;color:#42626c!important;font-size:9.5px!important;line-height:1.15!important;font-weight:800!important;letter-spacing:0!important}
.affiliate-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;padding:0!important;margin:0!important;overflow:visible!important}
.affiliate-card{display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;width:100%!important;height:54px!important;max-height:54px!important;min-height:54px!important;overflow:hidden!important;border:1px solid #d8e6ea!important;border-radius:7px!important;background:#fff!important;box-shadow:none!important;transform:none!important;text-decoration:none!important;color:inherit!important}
.affiliate-card:hover{border-color:#a5ced8!important;background:#fff!important;box-shadow:0 2px 8px rgba(7,75,95,.06)!important}
.affiliate-visual{display:block!important;width:48px!important;height:52px!important;min-width:48px!important;overflow:hidden!important;background:#fff!important}
.affiliate-visual img{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;background:#fff!important}
.affiliate-body{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:11px 18px 15px!important;column-gap:6px!important;width:100%!important;height:52px!important;padding:4px 6px!important;overflow:hidden!important}
.affiliate-mall{grid-column:1/3!important;display:block!important;max-width:100%!important;color:#6b8289!important;font-size:7.5px!important;line-height:1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.affiliate-body h3{grid-column:1/3!important;display:block!important;margin:1px 0 0!important;color:#153f4a!important;font-size:9.7px!important;line-height:1.2!important;font-weight:750!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.affiliate-price{grid-column:1!important;display:flex!important;align-items:end!important;min-width:0!important;margin:0!important;padding:0!important}
.affiliate-price strong{color:#075f75!important;font-size:9.8px!important;line-height:1!important;white-space:nowrap!important}
.affiliate-price del{display:none!important}
.affiliate-cta{grid-column:2!important;align-self:end!important;margin:0!important;padding:0!important;border:0!important;color:#08758d!important;font-size:7.5px!important;line-height:1!important;white-space:nowrap!important}

/* New depth blocks remain readable and never force a wide canvas. */
.v18-context-section{margin:36px 0 0;padding:18px 0 0;border-top:1px solid #dce9ec}
.v18-context-section>h2{margin:0 0 14px!important;color:var(--v18-ink)!important}
.v18-context-section>h3{margin:24px 0 10px!important;color:var(--v18-ink)!important;font-size:1.03rem!important}
.v18-context-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}
.v18-context-card{min-width:0;padding:13px;border:1px solid var(--v18-line);border-radius:11px;background:var(--v18-soft)}
.v18-context-card b{display:block;margin-bottom:5px;color:#075f78}
.v18-context-card p{margin:0!important;font-size:.91rem!important;line-height:1.66!important;color:var(--v18-text)!important}
.v18-context-list{display:grid;gap:7px;margin:13px 0;padding:0;list-style:none}
.v18-context-list li{position:relative;margin:0!important;padding:10px 12px 10px 33px!important;border:1px solid #dbe8ec;border-radius:9px;background:#fff;color:var(--v18-text)!important}
.v18-context-list li::before{content:"•";position:absolute;left:13px;top:8px;color:#07809b;font-size:18px;font-weight:900}
.v18-answer-note{margin:14px 0 0!important;padding:12px 13px;border-left:4px solid #2b9fb6;border-radius:0 9px 9px 0;background:#eef9fb;color:#315762!important}
.v18-guide-depth{margin-top:30px;padding:22px;border:1px solid var(--v18-line);border-radius:15px;background:#fbfdfe}
.v18-guide-depth h2{margin-top:0!important;color:var(--v18-ink)!important}

/* Tables wrap inside the viewport; no horizontal swipe is required. */
.table-scroll{max-width:100%!important;overflow:visible!important}
table{max-width:100%!important}
.wiki-table,.wiki-infobox,.summary-table,.forecast-table,.nifs-table{width:100%!important;max-width:100%!important;min-width:0!important;table-layout:fixed!important}
.wiki-table th,.wiki-table td,.wiki-infobox th,.wiki-infobox td,.summary-table th,.summary-table td,.forecast-table th,.forecast-table td,.nifs-table th,.nifs-table td{min-width:0!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:keep-all!important}

/* Stronger contrast on pale cyan surfaces. */
.home-premium .editorial-link small,.home-premium .topic-link span,.qna-hub .qna-category-tile small,.points-explorer-body .spot-result-item p,.dashboard-page .muted,.tide-center-body .muted,.quality-v7 .archive-card p,.quality-v7 .quality-card p{color:#45636d!important}
.home-premium .home-hero p,.quality-v7 .page-hero p,.quality-v7 .quality-archive-hero p{color:#315a66!important}

@media(max-width:1100px){
  .quality-v7 .container,.home-premium .container{width:min(100% - 26px,1180px)!important}
  .v18-context-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .spot-browser-shell,.dashboard-layout,.wiki-grid{max-width:100%!important}
}

@media(max-width:720px){
  .quality-v7 .container,.home-premium .container{width:min(100% - 20px,1180px)!important}
  .main-nav .container{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;padding:10px!important;overflow:visible!important}
  .main-nav a{width:100%!important;min-width:0!important;white-space:normal!important;text-align:center!important}
  .home-premium .home-hero h1,.quality-v7 .page-hero h1,.quality-v7 .quality-archive-hero h1,.quality-v7 .wiki-title-row h1{max-width:100%!important;font-size:clamp(34px,11vw,46px)!important;line-height:1.08!important;letter-spacing:-1.8px!important}
  .home-premium .home-hero p,.quality-v7 .page-hero p,.quality-v7 .quality-archive-hero p,.quality-v7 .wiki-title-row p{max-width:100%!important;font-size:15px!important;line-height:1.7!important}
  .luxe-route div{grid-template-columns:32px minmax(0,1fr)!important;gap:8px!important;padding:9px!important}
  .luxe-route small{grid-column:2!important}
  .editorial-shell,.topic-grid,.archive-grid,.related-grid,.v18-context-grid{grid-template-columns:1fr!important}
  .wiki-article{width:100%!important;max-width:100%!important;padding:25px 16px!important;overflow:visible!important}
  .wiki-toc{max-width:100%!important;overflow:visible!important}
  .wiki-toc a{white-space:normal!important}

  /* 320x50-ish affiliate treatment. */
  .affiliate-recommendations,.affiliate-placement-top,.affiliate-placement-bottom{padding:2px 0 3px!important}
  .affiliate-shell{width:min(100% - 16px,680px)!important}
  .affiliate-head{margin-bottom:2px!important}
  .affiliate-head h2,.affiliate-placement-top .affiliate-head h2{font-size:8.8px!important}
  .affiliate-grid{grid-template-columns:1fr!important;gap:0!important}
  .affiliate-card{grid-template-columns:44px minmax(0,1fr)!important;height:50px!important;min-height:50px!important;max-height:50px!important;border-radius:6px!important}
  .affiliate-card:nth-child(n+2){display:none!important}
  .affiliate-visual{width:44px!important;height:48px!important;min-width:44px!important}
  .affiliate-body{height:48px!important;grid-template-rows:10px 17px 13px!important;padding:4px 5px!important;column-gap:4px!important}
  .affiliate-mall{font-size:7px!important}.affiliate-body h3{font-size:9px!important}.affiliate-price strong{font-size:9.3px!important}.affiliate-cta{display:none!important}

  .wiki-table,.wiki-infobox,.summary-table,.forecast-table,.nifs-table{font-size:11px!important}
  .wiki-table th,.wiki-table td,.wiki-infobox th,.wiki-infobox td,.summary-table th,.summary-table td,.forecast-table th,.forecast-table td,.nifs-table th,.nifs-table td{padding:7px 6px!important;font-size:11px!important;line-height:1.42!important}
  .wiki-infobox th{width:34%!important}
  .v18-guide-depth{padding:16px 13px}
}

@media(max-width:390px){
  .quality-v7 .container,.home-premium .container{width:min(100% - 16px,1180px)!important}
  .main-nav .container{grid-template-columns:1fr 1fr!important;padding:8px!important}
  .affiliate-shell{width:calc(100% - 12px)!important}
  .affiliate-card{grid-template-columns:40px minmax(0,1fr)!important;height:48px!important;min-height:48px!important;max-height:48px!important}
  .affiliate-visual{width:40px!important;height:46px!important;min-width:40px!important}
  .affiliate-body{height:46px!important;grid-template-rows:9px 16px 13px!important;padding:3px 5px!important}
  .affiliate-body h3{font-size:8.7px!important}.affiliate-price strong{font-size:9px!important}
}


/* V18.1 final ultra-compact affiliate banner: no clipped text, no horizontal swipe. */
.affiliate-recommendations,.affiliate-placement-top,.affiliate-placement-bottom{padding:2px 0!important;min-height:0!important}
.affiliate-shell{width:min(100% - 24px,970px)!important}
.affiliate-head{display:none!important}
.affiliate-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;overflow:visible!important;padding:0!important;margin:0!important}
.affiliate-card{display:grid!important;grid-template-columns:44px minmax(0,1fr)!important;height:48px!important;min-height:48px!important;max-height:48px!important;overflow:hidden!important;border-radius:6px!important}
.affiliate-visual{width:44px!important;height:46px!important;min-width:44px!important;align-self:center!important}
.affiliate-body{display:flex!important;align-items:center!important;gap:7px!important;width:100%!important;height:46px!important;min-height:0!important;padding:4px 7px!important;overflow:hidden!important}
.affiliate-mall{flex:0 0 auto!important;max-width:70px!important;font-size:7.5px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.affiliate-body h3{display:block!important;flex:1 1 auto!important;min-width:0!important;margin:0!important;font-size:9.3px!important;line-height:1.25!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.affiliate-price{display:block!important;flex:0 0 auto!important;margin:0!important;white-space:nowrap!important}
.affiliate-price strong{font-size:9.5px!important;line-height:1!important}
.affiliate-cta{display:block!important;flex:0 0 auto!important;margin:0!important;padding:0!important;border:0!important;font-size:7.5px!important;white-space:nowrap!important}
.affiliate-disclosure{display:none!important}
@media(max-width:720px){
  .affiliate-shell{width:calc(100% - 12px)!important;max-width:100%!important}
  .affiliate-grid{grid-template-columns:minmax(0,1fr)!important;gap:0!important}
  .affiliate-card{grid-template-columns:40px minmax(0,1fr)!important;width:100%!important;height:46px!important;min-height:46px!important;max-height:46px!important}
  .affiliate-card:nth-child(n+2){display:none!important}
  .affiliate-visual{width:40px!important;height:44px!important;min-width:40px!important}
  .affiliate-body{height:44px!important;padding:3px 6px!important;gap:5px!important}
  .affiliate-mall{display:none!important}
  .affiliate-body h3{font-size:9px!important;line-height:1.2!important}
  .affiliate-price strong{font-size:9.2px!important}
  .affiliate-cta{display:none!important}
}
@media(max-width:360px){
  .affiliate-body h3{font-size:8.6px!important}
  .affiliate-price strong{font-size:8.8px!important}
}

/* V18.1 viewport hardening: neutralize legacy wide tables and scrolling nav rules. */
.main-nav .container{overflow:visible!important;overflow-x:visible!important;flex-wrap:wrap!important;scroll-snap-type:none!important}
.table-wrap,.table-scroll{width:100%!important;max-width:100%!important;overflow:visible!important;overflow-x:visible!important}
table,.wiki-table,.wiki-infobox,.summary-table,.forecast-table,.nifs-table{display:table!important;width:100%!important;max-width:100%!important;min-width:0!important;table-layout:fixed!important;overflow:visible!important}
table>tbody,.wiki-table tbody,.wiki-infobox tbody,.summary-table tbody,.forecast-table tbody,.nifs-table tbody{display:table-row-group!important;width:100%!important;min-width:0!important}
table>thead{display:table-header-group!important;width:100%!important;min-width:0!important}
table tr{min-width:0!important;max-width:100%!important}
table th,table td{min-width:0!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:keep-all!important}
.skills-jump{max-width:100%!important;overflow:visible!important}
@media(max-width:720px){
  .skills-jump{grid-template-columns:1fr!important}
  .wiki-toc{grid-template-columns:1fr!important}
  table th,table td{padding:6px 5px!important;font-size:10.5px!important;line-height:1.45!important}
}
