/* Sprint 19: responsive visual system */
:root{
  --bg:#f5f6fb;
  --bg-warm:#fbfaf7;
  --panel:#ffffff;
  --panel-soft:#f8f9fc;
  --panel-strong:#eef1f7;
  --text:#1d2533;
  --text-soft:#657085;
  --border:#e2e6ee;
  --border-strong:#cfd6e2;
  --brand:#315e52;
  --brand-deep:#23473e;
  --brand-soft:#e7f1ed;
  --coral:#de647d;
  --violet:#7257d8;
  --blue:#4c6fd7;
  --gold:#c98c1b;
  --cyan:#168aa8;
  --danger:#b94747;
  --shadow-sm:0 4px 14px rgba(34,44,62,.055);
  --shadow-md:0 14px 34px rgba(34,44,62,.09);
  --shadow-lg:0 28px 70px rgba(26,35,52,.16);
  --radius-sm:10px;
  --radius-md:16px;
  --radius-lg:24px;
  --font-sans:"Avenir Next","SF Pro Text","Segoe UI",Inter,system-ui,-apple-system,sans-serif;
  --font-display:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif;
}
html{scroll-behavior:smooth;background:var(--bg)}
body{background:radial-gradient(circle at 80% -10%,rgba(114,87,216,.08),transparent 34%),linear-gradient(180deg,var(--bg-warm),var(--bg));color:var(--text);font-family:var(--font-sans);font-size:15px;line-height:1.55;letter-spacing:-.005em;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
button,input,select,textarea{font:inherit}button,a,input,select,textarea,.card,.news-story,.guide-poster-card,.arena-library-card{transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease,color .16s ease,opacity .16s ease}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[contenteditable]:focus-visible{outline:3px solid rgba(76,111,215,.24);outline-offset:2px}
.shell{grid-template-columns:264px minmax(0,1fr)}
aside{background:linear-gradient(180deg,#172c27 0%,#1c3831 58%,#183029 100%);padding:24px 16px 18px;border-right:1px solid rgba(255,255,255,.06);box-shadow:12px 0 40px rgba(18,37,31,.12);z-index:20}
.brand{padding:4px 8px 24px;gap:11px}.brand>span,.brand-mark{width:42px;height:42px;border:1px solid rgba(255,255,255,.24);border-radius:14px;background:linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.035));box-shadow:inset 0 1px 0 rgba(255,255,255,.18);font-family:var(--font-display)}.brand strong{font-size:17px;letter-spacing:.01em}.brand small{font-size:11px;color:#a9beb7}
.nav-group-title{padding:15px 12px 7px;color:#819d94;font-size:9px;letter-spacing:.2em}
.nav,.arena-nav{min-height:43px;border:1px solid transparent;border-radius:12px;padding:10px 12px;margin:2px 0;color:#b8cac4;background:transparent;display:grid;grid-template-columns:24px 1fr;align-items:center;gap:8px;text-align:left;cursor:pointer}
.arena-nav{grid-template-columns:12px 1fr}.arena-nav small{grid-column:2;display:block;margin-top:-5px;font-size:10px;color:#819990}.nav:hover,.arena-nav:hover{background:rgba(255,255,255,.07);color:#fff;border-color:rgba(255,255,255,.06);transform:none}.nav.active,.arena-nav.active{background:linear-gradient(135deg,rgba(255,255,255,.14),rgba(255,255,255,.07));color:#fff;border-color:rgba(255,255,255,.11);box-shadow:0 8px 18px rgba(0,0,0,.13)}
.arena-dot{width:8px;height:8px;border-radius:50%;background:currentColor;box-shadow:0 0 0 4px rgba(255,255,255,.045)}.arena-nav.personal{color:#ff9eb1}.arena-nav.creative{color:#b5a4ff}.arena-nav.learning{color:#9eb7ff}.arena-nav.news{color:#ffd27b}.arena-nav.social{color:#82def0}
.storage{padding:16px 10px 0;font-size:12px}.storage button{margin-top:9px;border:0;background:transparent;color:#a8bcb5;padding:0;cursor:pointer}.command-hint{margin-top:13px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:#c2d2cc;border-radius:12px;padding:10px 11px;display:flex;justify-content:space-between;align-items:center;cursor:pointer}.command-hint:hover{background:rgba(255,255,255,.1)}.command-hint kbd{font-size:10px;background:rgba(255,255,255,.1);border-radius:6px;padding:3px 6px}
main{max-width:1600px;padding:34px clamp(22px,4vw,62px) 70px}header{margin-bottom:26px}h1,h2,h3{color:var(--text)}h1,h2{font-family:var(--font-display);letter-spacing:-.025em}h1{font-size:clamp(34px,4vw,52px);line-height:1.04}h2{line-height:1.12}.eyebrow{color:#798397;font-size:10px;letter-spacing:.16em}
.primary,.secondary,.text-button,.link-button,.file-button{min-height:40px;border-radius:11px;font-weight:750;letter-spacing:-.01em}.primary{background:linear-gradient(135deg,var(--brand),var(--brand-deep));box-shadow:0 7px 16px rgba(35,71,62,.18);padding:10px 16px}.primary:hover{transform:translateY(-1px);box-shadow:0 10px 20px rgba(35,71,62,.24)}.primary:active,.secondary:active{transform:translateY(0) scale(.985)}.secondary{border:1px solid var(--border-strong);background:var(--panel);color:var(--text);padding:9px 14px}.secondary:hover{border-color:#aeb8c8;background:#fbfcfe}.text-button{color:var(--brand)}button[disabled]{opacity:.48;cursor:not-allowed;transform:none!important;box-shadow:none!important}
.card{background:rgba(255,255,255,.92);border:1px solid rgba(215,221,232,.9);border-radius:var(--radius-lg);padding:22px;box-shadow:var(--shadow-sm);backdrop-filter:blur(10px)}.card:hover{transform:none;box-shadow:var(--shadow-md);border-color:#d4dae5}.section-title{align-items:flex-start}.section-title h2{font-size:clamp(22px,2vw,29px)}
input,select,textarea,.editor{border:1px solid var(--border);background:#fff;border-radius:12px;color:var(--text);box-shadow:inset 0 1px 1px rgba(22,30,45,.025)}input:hover,select:hover,textarea:hover,.editor:hover{border-color:#c6cedb}input:focus,select:focus,textarea:focus,.editor:focus{border-color:#8ca1d8;box-shadow:0 0 0 4px rgba(76,111,215,.09)}
.capture>input{font-size:17px}.toolbar{background:#f3f5f8;border-color:var(--border);border-radius:12px 12px 0 0}.editor{border-radius:0 0 12px 12px}.quick-capture-card{background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(245,249,247,.95))}
.briefing-hero{border-radius:28px!important;background:linear-gradient(132deg,#244b41 0%,#315f53 56%,#4e6f68 100%)!important;box-shadow:0 22px 52px rgba(38,77,67,.2)!important}.briefing-hero h2,.briefing-hero .briefing-kicker,.briefing-hero p{color:#fff!important}.briefing-focus-panel{background:rgba(255,255,255,.1)!important;border-color:rgba(255,255,255,.16)!important}.briefing-focus-panel input{color:#fff!important;border-bottom-color:rgba(255,255,255,.3)!important}.briefing-focus-panel input::placeholder{color:rgba(255,255,255,.6)}
.executive-grid{grid-template-columns:minmax(250px,1.25fr) repeat(4,minmax(150px,.8fr));gap:14px}.executive-card{border-radius:19px;padding:18px;background:linear-gradient(150deg,#fff,#f8fafc);box-shadow:var(--shadow-sm)}.executive-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}.executive-card strong{font-family:var(--font-display);font-size:32px}.status-chip,.badge{border-radius:999px}
.dashboard-grid{gap:18px}.intelligence-item,.next-action-item,.knowledge-result,.news-story{border-radius:15px;background:rgba(255,255,255,.94)}.intelligence-item:hover,.next-action-item:hover,.knowledge-result:hover,.news-story:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}
.objects-grid,.arena-catalog,.watchos-library,.watch-guide-results{gap:16px}.object-card,.arena-library-card,.watch-card,.watch-guide-card,.guide-poster-card{border-color:var(--border);border-radius:18px;background:var(--panel);box-shadow:var(--shadow-sm)}.object-card:hover,.arena-library-card:hover,.watch-card:hover,.watch-guide-card:hover,.guide-poster-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:#c7cfdd}
.newsos-hero{padding:22px 24px;border:1px solid var(--border);border-radius:24px;background:linear-gradient(145deg,#fff,#f8f8fc);box-shadow:var(--shadow-sm)}.newsos-mode-tabs,.news-category-tabs{scrollbar-width:none}.newsos-mode-tabs::-webkit-scrollbar,.news-category-tabs::-webkit-scrollbar,.guide-shelf-track::-webkit-scrollbar{display:none}.news-mode,.news-category{background:rgba(255,255,255,.88);border-color:var(--border);padding:8px 13px}.news-mode.active,.news-category.active{background:linear-gradient(135deg,#293547,#1d2634);border-color:#293547}.news-story{padding:18px 19px}.news-story h3{font-size:18px;letter-spacing:-.015em}.newsos-sidebar{position:sticky;top:26px;height:max-content}.newsos-sidebar .card{border-radius:18px}
.watchos,.watch-guide{border-color:var(--border);background:rgba(255,255,255,.82);border-radius:22px;box-shadow:var(--shadow-sm)}.guide-shelf-track{gap:12px;padding:4px 3px 13px}.guide-poster-card{flex-basis:168px;padding:8px}.guide-poster-card img,.guide-poster-placeholder{border-radius:12px}.watchos-stats article{background:#fff;border-color:var(--border);border-radius:16px;box-shadow:var(--shadow-sm)}
dialog{border-radius:24px;box-shadow:var(--shadow-lg)}dialog::backdrop{background:rgba(19,27,39,.56);backdrop-filter:blur(5px)}
.empty-state{padding:22px;border:1px dashed #cfd6e2;border-radius:16px;background:#fafbfd;color:var(--text-soft)}
body:not(.app-ready) .shell{opacity:0}body.app-ready .shell{opacity:1;transition:opacity .22s ease}.view.active{animation:viewIn .2s ease both}@keyframes viewIn{from{opacity:.25;transform:translateY(5px)}to{opacity:1;transform:none}}
@media(max-width:1220px){.executive-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.executive-grid .feature-card{grid-column:span 2}.newsos-layout{grid-template-columns:minmax(0,1fr) 275px}}
@media(max-width:980px){.shell{grid-template-columns:218px minmax(0,1fr)}aside{padding-inline:11px}.brand small,.arena-nav small{display:none}main{padding-inline:22px}.dashboard-grid,.newsos-layout{grid-template-columns:1fr}.newsos-sidebar{position:static;grid-template-columns:repeat(3,minmax(0,1fr))}.executive-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.executive-grid .feature-card{grid-column:span 2}}
@media(max-width:760px){body{padding-bottom:72px}.shell{display:block}.shell>aside{position:fixed;inset:auto 0 0 0;height:68px;padding:8px 10px;background:rgba(24,48,41,.96);backdrop-filter:blur(16px);border-top:1px solid rgba(255,255,255,.12);display:block;z-index:100;overflow-x:auto;overflow-y:hidden}.brand,.nav-group-title,.storage,.command-hint,.arena-nav small{display:none!important}.lifenav{display:flex;flex-direction:row;gap:5px;width:max-content;min-width:100%}.nav,.arena-nav{display:flex;flex-direction:column;justify-content:center;gap:1px;min-width:70px;height:52px;padding:5px 8px;margin:0;text-align:center;border-radius:11px;font-size:10px}.arena-nav{grid-template-columns:none}.nav-icon{font-size:16px}.arena-dot{width:7px;height:7px}.shell>main{padding:22px 15px 34px}.header-action{min-width:44px;padding:10px}.header-action span{margin-right:0}.header-action{font-size:0}.header-action span{font-size:18px}.briefing-hero{padding:22px!important}.briefing-actions{flex-wrap:wrap}.executive-grid{grid-template-columns:1fr 1fr}.executive-grid .feature-card{grid-column:span 2}.dashboard-grid{grid-template-columns:1fr}.newsos-sidebar{grid-template-columns:1fr}.newsos-toolbar,.watchos-toolbar,.watch-guide-search,.knowledge-search-row{display:grid;grid-template-columns:1fr}.newsos-toolbar span{white-space:normal}.card{padding:17px;border-radius:19px}.news-story{grid-template-columns:1fr}.guide-poster-card{flex-basis:145px}.two-fields,.import-fields,.watchos-form{grid-template-columns:1fr}.list-header,header{align-items:flex-start;flex-wrap:wrap}.filters{width:100%}.filters input,.filters select{width:100%}}
@media(max-width:480px){h1{font-size:34px}.executive-grid{grid-template-columns:1fr}.executive-grid .feature-card{grid-column:auto}.briefing-actions>*{width:100%}.watchos-stats{grid-template-columns:1fr 1fr}.newsos-hero{padding:18px}.section-title{gap:10px}.section-title h2{font-size:22px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}.view.active{animation:none}}

/* Sprint 20: global shell containment and landmark repair */
html,body{min-height:100%;width:100%;overflow-x:hidden}
.shell{width:100%;min-width:0;align-items:start}
.shell>main{min-width:0;max-width:none;margin:0;width:100%;overflow:hidden}
.view{min-width:0;width:100%}
.view>*{min-width:0}
.newsos-layout,.dashboard-grid,.executive-grid,.objects-grid,.arena-catalog,.watchos-library,.watch-guide-results{min-width:0}
.news-story-list,.newsos-sidebar{min-width:0}
img,video,iframe{max-width:100%}
input,select,textarea,button{max-width:100%}
.arena-explorer,.watchos,.watch-guide,.arena-indexer{width:100%;min-width:0}
.watchos-toolbar>*{min-width:0}
@media(max-width:980px){.shell>main{overflow:visible}}
