/* Round 4 frame: one fixed header, white page, table of contents left of the reader.
   Loaded last on every portal page; overrides earlier header/sidebar rounds in portal.css. */
:root,:root[data-theme=light],.portal-home{
 --portal-head:88px;--frame:1200px;--gutter:24px;
 --bg:#fff;--panel:#fff;--panel2:#f5f7ee;--line:#e2e6da;--text:#141a10;--copy:#272e22;--muted:#5d6655;
 --accent:#3d7a14;--accent-ink:#fff;--accent-text:#356b12;--chip:#edf2df;--tile:#f2f6e4;--lime:#a8c42a}
/* Logo palette: leaf green #3d7a14 and lime #a8c42a instead of the former blue-green mint. */
.portal-hero,.portal-feature--top{border-color:#dfe8c6}
.portal-leaf,.portal-card-leaf{color:var(--lime)}
.portal-duty-digit,.portal-reader .duty-card .card-number{font-family:'Inter Tight',Inter,sans-serif;font-weight:800;letter-spacing:.02em;color:var(--accent)}
html,body{background:#fff}
body{font-size:17px}

/* Header: logo left, text navigation right, identical at every scroll position. */
.portal-header,.portal-home .portal-header,:root[data-header-compact=true] .portal-header{
 position:sticky;top:0;z-index:40;height:var(--portal-head);display:flex;align-items:center;justify-content:space-between;gap:32px;
 padding:0 max(var(--gutter),calc((100vw - var(--frame))/2 + var(--gutter)));background:#fff;border-bottom:1px solid var(--line);transition:none}
.portal-brand,.portal-home .portal-brand,:root[data-header-compact=true] .portal-brand{
 display:flex;flex-direction:row;align-items:center;gap:16px;flex:none;color:var(--text);text-decoration:none;
 font:800 27px/1.1 'Inter Tight',Inter,sans-serif;letter-spacing:-.02em;white-space:nowrap;text-align:left;max-width:none}
.portal-brand img,.portal-home .portal-brand img,:root[data-header-compact=true] .portal-brand img{width:64px;height:64px;flex:none}
.portal-brand>h1,.portal-brand>span{font:inherit;letter-spacing:inherit;line-height:inherit;margin:0;text-align:left}
.portal-area-nav,:root[data-header-compact=true] .portal-area-nav{display:flex;align-items:stretch;justify-content:flex-end;gap:30px;height:100%;min-width:0}
.portal-area-chip,:root[data-header-compact=true] .portal-area-chip{
 position:relative;display:flex;align-items:center;height:100%;padding:0;border:0;border-radius:0;background:none;
 color:var(--copy);font-size:15px;font-weight:600;line-height:1.3;text-decoration:none;white-space:nowrap}
.portal-area-chip:hover{color:var(--accent-text);background:none;border:0}
.portal-area-chip[aria-current]{color:var(--text);background:none}
.portal-area-chip[aria-current]::after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:3px;background:var(--accent);border-radius:3px 3px 0 0}
.portal-area-chip:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.portal-menu-button,.portal-home .portal-menu-button{display:none}

/* Page frame: no sidebar; header, content and footer share one container. */
.portal-shell{display:block;max-width:none;min-height:0}
.portal-sidebar{display:none}
.portal-main{max-width:var(--frame);margin:0 auto;padding:40px var(--gutter) 72px}
.portal-main>.breadcrumbs,.portal-hero,.portal-content-grid,.portal-next,.portal-home-block{max-width:none}
.portal-hero{margin-bottom:48px}
.portal-hero-meta{font-size:13px}.portal-law-chip{font-size:13px}
.breadcrumbs{font-size:13px}

/* Reader with table of contents on the left. */
.portal-content-grid{display:grid;grid-template-columns:250px minmax(0,1fr);gap:64px;justify-content:start;align-items:start}
.portal-content-grid--single{grid-template-columns:minmax(0,1fr)}
.portal-toc{grid-column:1;grid-row:1;position:sticky;top:calc(var(--portal-head) + 32px);max-height:calc(100svh - var(--portal-head) - 64px);overflow:auto;
 padding:0 8px 0 0;border:0;border-radius:0;background:none;font-size:13px;line-height:1.5}
.portal-toc summary{list-style:none;cursor:default;font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);pointer-events:none}
.portal-toc summary::-webkit-details-marker{display:none}.portal-toc summary span+span{display:none}
.portal-toc>nav>ol{margin-top:14px;border-left:1px solid var(--line)}
.portal-toc li{margin:0}
.portal-toc a{padding:7px 0 7px 14px;margin-left:-1px;border-left:2px solid transparent;color:var(--muted)}
.portal-toc a:hover{color:var(--text)}
.portal-toc a[aria-current=location]{color:var(--accent-text);border-left-color:var(--accent);font-weight:600}
.portal-toc .gruendung-step-toc,.portal-toc .behoerden-country-toc{border-left:0;margin-left:0;padding-left:12px}
.portal-reader,.portal-content-grid--single>.portal-reader{grid-column:2;grid-row:1;max-width:760px;font-size:18px;line-height:1.8;color:var(--copy);hyphens:manual}
.portal-content-grid--single>.portal-reader{grid-column:1}
.portal-reader>p:first-child,.portal-reader>.csc-intro{font-size:20px;color:var(--text)}
.portal-reader h2,.portal-reader h3,.portal-hero h1{text-wrap:pretty}
.portal-reader h2{font-size:30px}
.portal-reader .portal-step>h3,.portal-hero h1{hyphens:manual}
@media(min-width:900px){.portal-hero h1{hyphens:none;max-width:30ch}}
.portal-secondary .portal-feature h3{font-size:19px;hyphens:manual;overflow-wrap:break-word}

/* Green as an accent: one highlighted surface per page (hero / top feature), other cards white. */
.portal-secondary .portal-feature,.portal-duty-card,.portal-reader .duty-card,.portal-widget--software,.portal-next-number{background:#fff}
.portal-secondary .portal-feature .portal-card-leaf{display:none}
.portal-duty-card,.portal-reader .duty-card,.portal-secondary .portal-feature{border-color:var(--line)}
.portal-duty-card:hover,.portal-reader .duty-card:hover,.portal-secondary .portal-feature:hover{border-color:var(--accent)}
.portal-next-number{border:1px solid var(--line)}

/* Footer on the same container. */
.portal-footer{padding:48px var(--gutter);background:#fff}
.portal-footer>.container{max-width:calc(var(--frame) - 2*var(--gutter))}

/* Mid widths: table of contents becomes a collapsible block above the text. */
@media(max-width:1099px){
 .portal-content-grid{grid-template-columns:minmax(0,1fr);gap:28px}
 .portal-toc{grid-column:1;grid-row:1;position:static;max-height:none;padding:16px 20px;border:1px solid var(--line);border-radius:12px}
 .portal-toc summary{pointer-events:auto;cursor:pointer;font-size:13px;letter-spacing:.04em;display:flex;justify-content:space-between;align-items:center}
 .portal-toc summary::after{content:'+';font-size:20px;font-weight:400;color:var(--accent-text);letter-spacing:0}
 .portal-toc[open] summary::after{content:'−'}
 .portal-reader{grid-column:1;grid-row:2;max-width:760px}
 .portal-area-nav{gap:20px}.portal-area-chip{font-size:14px}
 .portal-brand,.portal-home .portal-brand{font-size:23px}
 .portal-brand img,.portal-home .portal-brand img{width:56px;height:56px}
}
@media(max-width:1023px) and (min-width:900px){.portal-area-nav{gap:14px}.portal-area-chip{font-size:13px}.portal-brand,.portal-home .portal-brand{font-size:20px}}

/* Mobile: logo left, labelled menu button right, navigation as panel below the header. */
@media(max-width:899px){
 :root,:root[data-theme=light],.portal-home{--portal-head:68px;--gutter:18px}
 .portal-header,.portal-home .portal-header{gap:12px}
 .portal-brand,.portal-home .portal-brand{font-size:18px;gap:10px;white-space:normal;min-width:0}
 .portal-brand img,.portal-home .portal-brand img{width:44px;height:44px}
 .portal-menu-button,.portal-home .portal-menu-button{display:inline-flex;align-items:center;gap:10px;flex:none;margin:0;padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--text);font-size:14px;font-weight:600}
 .portal-menu-button[hidden]{display:none}
 .portal-header[data-menu=open] .portal-menu-lines{background:linear-gradient(45deg,transparent 45%,var(--text) 45%,var(--text) 55%,transparent 55%),linear-gradient(-45deg,transparent 45%,var(--text) 45%,var(--text) 55%,transparent 55%)}
 .portal-menu-label{display:inline}
 .portal-area-nav{display:none}
 html[data-portal-ready] .portal-header[data-menu=open] .portal-area-nav{
  display:flex;flex-direction:column;align-items:stretch;gap:0;position:absolute;left:0;right:0;top:100%;height:auto;
  padding:8px var(--gutter) 20px;background:#fff;border-bottom:1px solid var(--line);box-shadow:0 16px 32px #1117131a}
 html:not([data-portal-ready]) .portal-area-nav{display:flex;flex-wrap:wrap;position:static;height:auto;gap:8px 16px}
 .portal-header[data-menu=open] .portal-area-chip{height:auto;padding:15px 4px;font-size:17px;border-bottom:1px solid var(--line)}
 .portal-header[data-menu=open] .portal-area-chip:last-child{border-bottom:0}
 .portal-header[data-menu=open] .portal-area-chip[aria-current]::after{left:-12px;right:auto;top:12px;bottom:12px;width:3px;height:auto;border-radius:0 3px 3px 0}
 .portal-main{padding:24px var(--gutter) 56px}
 .portal-reader{font-size:17px}
 .portal-reader>p:first-child,.portal-reader>.csc-intro{font-size:18px}
 .portal-reader h2{font-size:26px}
 .portal-footer{padding:36px var(--gutter)}
}
@media(max-width:380px){.portal-brand,.portal-home .portal-brand{font-size:17px}.portal-brand img,.portal-home .portal-brand img{width:38px;height:38px}.portal-menu-button,.portal-home .portal-menu-button{padding:9px 10px}}

.portal-reader .duty-card .card-number{font-size:30px;line-height:1;margin-bottom:14px}

/* Round 5: C·S·C logo, black header and footer like 420-plus.com. */
:root{--ink:#0d0f0b;--ink-line:#262a22;--ink-copy:#e6e9e2;--ink-muted:#a7ad9f;--lime:#a8c42a}
.portal-header,.portal-home .portal-header{background:var(--ink);border-bottom-color:var(--ink-line);height:96px}
:root,:root[data-theme=light],.portal-home{--portal-head:96px}
.portal-brand,.portal-home .portal-brand{flex-direction:column;align-items:flex-start;gap:7px;color:#fff}
.portal-logo{display:block;line-height:0}
.portal-brand .portal-logo img,.portal-home .portal-brand .portal-logo img,:root[data-header-compact=true] .portal-brand .portal-logo img{display:block;height:40px;width:auto;max-width:none}
.portal-brand-sub,h1.portal-brand-sub,span.portal-brand-sub{display:block;margin:0;font:900 10.5px/1 Inter,sans-serif;letter-spacing:.22em;text-transform:uppercase;color:#fff;text-align:left}
.portal-area-chip,:root[data-header-compact=true] .portal-area-chip{color:var(--ink-copy)}
.portal-area-chip:hover{color:#fff}
.portal-area-chip[aria-current]{color:#fff}
.portal-area-chip[aria-current]::after{background:var(--lime)}
.portal-area-chip:focus-visible{outline-color:var(--lime)}
.portal-footer{background:var(--ink);color:var(--ink-muted);border-top:0}
.portal-footer a,.portal-footer .footer-column-title{color:var(--ink-copy)}
.portal-footer .footer-bottom{border-top-color:var(--ink-line)}
.portal-footer .footer-bottom-logo{width:auto;height:26px}
.skip-link{background:var(--lime);color:var(--ink)}
@media(max-width:1099px){.portal-brand .portal-logo img,.portal-home .portal-brand .portal-logo img{height:34px}.portal-brand-sub,h1.portal-brand-sub,span.portal-brand-sub{font-size:9.5px}}
@media(max-width:899px){
 :root,:root[data-theme=light],.portal-home{--portal-head:72px}
 .portal-header,.portal-home .portal-header{height:72px}
 .portal-brand .portal-logo img,.portal-home .portal-brand .portal-logo img{height:28px}
 .portal-brand-sub,h1.portal-brand-sub,span.portal-brand-sub{font-size:8px;letter-spacing:.2em}
 .portal-menu-button,.portal-home .portal-menu-button{border-color:var(--ink-line);background:transparent;color:#fff}
 .portal-menu-lines{background:linear-gradient(#fff,#fff) 0 0/100% 2px no-repeat,linear-gradient(#fff,#fff) 0 6px/100% 2px no-repeat,linear-gradient(#fff,#fff) 0 12px/100% 2px no-repeat}
 .portal-header[data-menu=open] .portal-menu-lines{background:linear-gradient(45deg,transparent 45%,#fff 45%,#fff 55%,transparent 55%),linear-gradient(-45deg,transparent 45%,#fff 45%,#fff 55%,transparent 55%)}
 html[data-portal-ready] .portal-header[data-menu=open] .portal-area-nav{background:var(--ink);border-bottom-color:var(--ink-line)}
 .portal-header[data-menu=open] .portal-area-chip{border-bottom-color:var(--ink-line);color:var(--ink-copy)}
 .portal-header[data-menu=open] .portal-area-chip[aria-current]::after{background:var(--lime)}
}
@media(max-width:380px){.portal-brand .portal-logo img,.portal-home .portal-brand .portal-logo img{height:24px}.portal-brand-sub,h1.portal-brand-sub,span.portal-brand-sub{display:none}}

/* Round 5b: logo width equals the width of the subline. */
.portal-brand,.portal-home .portal-brand{width:232px;gap:8px}
.portal-brand .portal-logo,.portal-home .portal-brand .portal-logo{width:100%}
.portal-brand .portal-logo img,.portal-home .portal-brand .portal-logo img,:root[data-header-compact=true] .portal-brand .portal-logo img{width:100%;height:auto}
.portal-brand-sub,h1.portal-brand-sub,span.portal-brand-sub{white-space:nowrap}
@media(max-width:1099px){.portal-brand,.portal-home .portal-brand{width:210px}.portal-brand .portal-logo img,.portal-home .portal-brand .portal-logo img{height:auto}}
@media(max-width:899px){.portal-brand,.portal-home .portal-brand{width:172px;gap:6px}.portal-brand .portal-logo img,.portal-home .portal-brand .portal-logo img{height:auto}}
@media(max-width:380px){.portal-brand,.portal-home .portal-brand{width:120px}.portal-brand .portal-logo img,.portal-home .portal-brand .portal-logo img{height:auto}}

/* Clearance around the unchanged logo and caption; shared by sticky offsets. */
:root,:root[data-theme=light],.portal-home{--portal-head:124px}
@media(max-width:899px){:root,:root[data-theme=light],.portal-home{--portal-head:100px}}
@media(max-width:767px){:root,:root[data-theme=light],.portal-home{--portal-head:92px}}
@media(max-width:899px){
 html[data-portal-ready] .portal-header[data-menu=open] .portal-area-nav{
  position:fixed;top:var(--portal-head);max-height:calc(100svh - var(--portal-head));overflow-y:auto;z-index:3;
 }
}
