/* ════════════════════════════════════════════════════════════
   Digitally Sovereign — tobiaseigen.org
   Shared stylesheet for all pages
   Marigold Dark palette
   ════════════════════════════════════════════════════════════ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #ffffff;
  --secondary:  #1a1a1a;
  --tertiary:   #d3881f;
  --quaternary: #e45735;
  --header-bg:  #1a1a1a;
  --selected:   #6c5b49;
  --hover-bg:   #584b3e;
  --bg:         #1a1a1a;
  --bg-alt:     #242424;
  --bg-card:    #2a2a2a;
  --bg-elevated:#333333;
  --border:     #3d3d3d;
  --text:       #e8e8e8;
  --muted:      #a89880;
  --white:      #ffffff;
  --radius:     10px;
  --radius-sm:  6px;
  --shadow:     0 2px 16px rgba(0,0,0,0.40);
  --font:       system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
}

html  { scroll-behavior: smooth; font-size: 16px; }
body  { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.65; }
a     { color: var(--tertiary); text-decoration: none; }
a:hover { text-decoration: underline; }
img   { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.25; color: var(--primary); font-weight: 700; }
p     { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
ul, ol { margin-bottom: 1rem; }
code  { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 0.88em;
        background: var(--bg-elevated); padding: 0.1em 0.4em; border-radius: 3px; }

/* ── Layout ── */
.container    { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }
.section      { padding: 5rem 0; }
.section--alt { background: var(--bg-alt); }

/* ── Typography helpers ── */
.section-label {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--tertiary); margin-bottom: 0.75rem;
}
.section-heading { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 1.25rem; }
.section-intro   { font-size: 1.1rem; color: var(--muted); max-width: 700px; margin-bottom: 3rem; }

/* ── Buttons ── */
.btn { display: inline-block; padding: 0.8rem 1.75rem; border-radius: var(--radius);
       font-weight: 700; font-size: 0.95rem; cursor: pointer;
       transition: opacity 0.15s, transform 0.1s; text-decoration: none; border: none; }
.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn--primary { background: var(--tertiary);    color: var(--secondary); }
.btn--outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.45); }
.btn--outline:hover { border-color: var(--tertiary); color: var(--tertiary); }
.btn--dark    { background: var(--bg-elevated); color: var(--white); }
.btn--teal    { background: var(--selected);    color: var(--white); }
.btn-group    { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ── Nav ── */
#nav { position: sticky; top: 0; z-index: 100; background: var(--header-bg);
       border-bottom: 1px solid rgba(255,255,255,0.08); }
.nav-inner { display: flex; align-items: center; justify-content: space-between;
             height: 3.75rem; gap: 1rem; }
.nav-brand { display: flex; align-items: center; gap: 0.6rem; color: var(--white);
             font-weight: 700; font-size: 1.05rem; text-decoration: none; flex-shrink: 0; }
.nav-brand img { width: 28px; height: 28px; border-radius: 4px; }
.nav-brand:hover { text-decoration: none; opacity: 0.9; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; }
.nav-links a { color: rgba(255,255,255,0.82); font-size: 0.9rem; padding: 0.4rem 0.75rem;
               border-radius: var(--radius); transition: background 0.15s, color 0.15s;
               white-space: nowrap; }
.nav-links a:hover { background: var(--hover-bg); color: var(--white); text-decoration: none; }
.nav-links a.nav-active { color: var(--tertiary); }
.nav-cta { background: var(--tertiary) !important; color: var(--secondary) !important;
           font-weight: 700; border-radius: var(--radius) !important; }
.nav-cta:hover { opacity: 0.88; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer;
              padding: 0.5rem; background: none; border: none; }
.nav-toggle span { display: block; width: 22px; height: 2px;
                   background: var(--white); border-radius: 2px; }

/* ── Hero (shared) ── */
#hero { background: linear-gradient(145deg, #1a1a1a 0%, #1f1a14 55%, #261e10 100%);
        color: var(--white); border-bottom: 1px solid var(--border); }
.hero-inner { max-width: 760px; }
#hero h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); color: var(--white);
           margin-bottom: 1.25rem; line-height: 1.18; }
#hero h1 em { font-style: normal; color: var(--tertiary); }
.hero-sub { font-size: clamp(1rem, 2vw, 1.2rem); color: rgba(255,255,255,0.75);
            margin-bottom: 2.25rem; max-width: 620px; }
.hero-main     { padding: 6rem 0 5rem; }
.hero-sub-page { padding: 5rem 0 4rem; }
.btn-group--hero { margin-bottom: 3.5rem; }
.hero-footnote { font-size: 0.82rem; color: rgba(255,255,255,0.45); margin-bottom: 0; }

/* ── Stack bar (index hero) ── */
.stack-bar { margin-top: 3.5rem; padding-top: 2rem;
             border-top: 1px solid rgba(255,255,255,0.10); }
.stack-bar p { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
               color: rgba(255,255,255,0.35); margin-bottom: 1rem; }
.stack-logos { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.stack-logos span { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.07em;
                    color: rgba(255,255,255,0.45); }

/* ── Pillars ── */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
           gap: 2rem; margin-top: 3rem; }
.pillar { background: var(--bg-card); border: 1px solid var(--border);
          border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.pillar-icon { font-size: 1.75rem; margin-bottom: 1rem; }
.pillar-tag  { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
               text-transform: uppercase; color: var(--tertiary); margin-bottom: 0.4rem; }
.pillar h3   { font-size: 1.1rem; margin-bottom: 0.6rem; color: var(--primary); }
.pillar p    { font-size: 0.95rem; color: var(--muted); }

/* ── About ── */
.about-grid { display: grid; grid-template-columns: 280px 1fr; gap: 4rem; align-items: start; }
.about-photo { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%;
               aspect-ratio: 3/4; object-fit: cover; border: 1px solid var(--border); }

/* ── Services ── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
                 gap: 2rem; margin-bottom: 2.5rem; }
.service-card  { background: var(--bg-card); border: 1px solid var(--border);
                 border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
                 display: flex; flex-direction: column; }
.service-num   { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em;
                 color: var(--tertiary); margin-bottom: 0.5rem; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; color: var(--primary); }
.service-card p  { font-size: 0.95rem; color: var(--muted); flex: 1; margin-bottom: 1.5rem; }
.service-card a  { font-size: 0.9rem; font-weight: 600; color: var(--tertiary); }
.service-card a:hover { text-decoration: underline; }
.service-note  { background: var(--bg-card); border: 1px solid var(--border);
                 border-left: 4px solid var(--tertiary); padding: 1.5rem 1.75rem;
                 border-radius: 0 var(--radius) var(--radius) 0; font-size: 0.95rem;
                 color: var(--muted); margin-bottom: 2rem; box-shadow: var(--shadow);
                 line-height: 1.7; }
.service-note strong { color: var(--primary); }

/* ── How it works steps (index teaser) ── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
         gap: 2rem; margin-bottom: 2.5rem; }
.step  { display: flex; gap: 1.25rem; align-items: flex-start; }
.step-num { flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%;
            background: var(--tertiary); color: var(--secondary); font-weight: 700;
            font-size: 0.9rem; display: flex; align-items: center; justify-content: center; }
.step h3 { font-size: 1.05rem; margin-bottom: 0.4rem; color: var(--primary); }
.step p  { font-size: 0.92rem; color: var(--muted); }

/* ── Membership / billing toggle ── */
.membership-intro { max-width: 720px; margin-bottom: 2.5rem; color: var(--muted);
                    line-height: 1.75; }
.billing-toggle-wrap { display: flex; align-items: center; gap: 1rem;
                       margin-bottom: 2.5rem; flex-wrap: wrap; }
.billing-toggle-label { font-size: 0.95rem; font-weight: 600; color: var(--muted);
                        cursor: pointer; transition: color 0.15s; user-select: none; }
.billing-toggle-label.active { color: var(--primary); }
.toggle-switch { position: relative; width: 48px; height: 26px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track { position: absolute; inset: 0; background: var(--bg-elevated);
                border: 1px solid var(--border); border-radius: 13px; cursor: pointer;
                transition: background 0.2s; }
.toggle-track::after { content: ''; position: absolute; top: 3px; left: 3px;
                       width: 18px; height: 18px; background: var(--tertiary);
                       border-radius: 50%; transition: transform 0.2s; }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(22px); }
.billing-badge { display: inline-block; font-size: 0.72rem; font-weight: 700;
                 letter-spacing: 0.06em; text-transform: uppercase;
                 background: rgba(211,136,31,0.15); color: var(--tertiary);
                 border: 1px solid rgba(211,136,31,0.35); border-radius: 4px;
                 padding: 0.2rem 0.55rem; }

/* ── Plan comparison table ── */
.plan-table-wrap { overflow-x: auto; margin-bottom: 2rem; border-radius: var(--radius);
                   border: 1px solid var(--border); box-shadow: var(--shadow); }
.plan-table { width: 100%; border-collapse: collapse; font-size: 0.88rem;
              background: var(--bg-card); min-width: 560px; }
.plan-table thead tr th { padding: 0; vertical-align: bottom; }
.plan-table thead th:first-child { width: 36%; }
.plan-col-header { padding: 1.5rem 1.25rem 1.25rem; text-align: center;
                   border-left: 1px solid var(--border); position: relative; }
.plan-col-header.featured { background: var(--tertiary);
                            border-top: 3px solid var(--quaternary); }
.plan-col-header .plan-name { font-weight: 700; font-size: 1rem; color: var(--primary);
                              margin-bottom: 0.25rem; }
.plan-col-header.featured .plan-name { color: var(--secondary); }
.plan-col-header .plan-price { font-size: 1.5rem; font-weight: 800; color: var(--primary);
                               line-height: 1.2; }
.plan-col-header.featured .plan-price { color: var(--secondary); }
.plan-col-header .plan-price-period { font-size: 0.82rem; font-weight: 400; opacity: 0.75; }
.plan-table .row-group td { background: var(--bg-elevated); color: var(--tertiary);
                            font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
                            text-transform: uppercase; padding: 0.6rem 1.25rem 0.4rem;
                            border-top: 1px solid var(--border); }
.plan-table .row-group td:not(:first-child) { border-left: 1px solid var(--border); }
.plan-table .feature-row td { padding: 0.55rem 1.25rem; border-top: 1px solid var(--border);
                              vertical-align: middle; color: var(--text); line-height: 1.45; }
.plan-table .feature-row td:not(:first-child) { text-align: center;
                                                border-left: 1px solid var(--border); }
.plan-table .feature-row td.featured-col { background: rgba(211,136,31,0.06); }
.plan-table .feature-row td .check { color: var(--tertiary); font-size: 1rem; }
.plan-table .feature-row td .cross { color: #555; font-size: 1rem; }
.plan-table .feature-label { color: var(--muted); font-size: 0.88rem; }
.plan-table .feature-note  { font-size: 0.78rem; color: var(--muted); display: block;
                             margin-top: 0.1rem; }
.plan-table .cta-row td { padding: 1.25rem; border-top: 1px solid var(--border); }
.plan-table .cta-row td:not(:first-child) { border-left: 1px solid var(--border); }
.plan-table .cta-row td:first-child { background: transparent; }
.plan-table .cta-row .btn { display: block; text-align: center; width: 100%;
                            padding: 0.7rem 1rem; font-size: 0.88rem; }
.membership-note { background: var(--bg-card); border-left: 4px solid var(--quaternary);
                   padding: 1.25rem 1.5rem; border-radius: 0 var(--radius) var(--radius) 0;
                   font-size: 0.95rem; color: var(--muted); }

/* ── FAQ (shared) ── */
.faq-list { max-width: 760px; }
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list details:first-child { border-top: 1px solid var(--border); }
.faq-list summary { padding: 1.25rem 0; font-weight: 600; font-size: 1rem;
                    color: var(--primary); cursor: pointer; list-style: none;
                    display: flex; justify-content: space-between;
                    align-items: center; gap: 1rem; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font-size: 1.4rem; font-weight: 300;
                           color: var(--tertiary); flex-shrink: 0; line-height: 1; }
.faq-list details[open] summary::after { content: '−'; }
.faq-answer { padding: 0 0 1.5rem; font-size: 0.96rem; color: var(--muted);
              line-height: 1.7; }

/* ── Contact ── */
.contact-grid { display: grid; grid-template-columns: 1fr 340px; gap: 4rem;
                align-items: start; }
.form-group   { margin-bottom: 1.4rem; }
label         { display: block; font-size: 0.88rem; font-weight: 600;
                margin-bottom: 0.4rem; color: var(--primary); }
input[type="text"], input[type="email"], textarea {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.95rem; font-family: var(--font);
  color: var(--text); background: var(--bg-elevated);
  transition: border-color 0.15s, box-shadow 0.15s; }
input::placeholder, textarea::placeholder { color: #666; }
input:focus, textarea:focus { outline: none; border-color: var(--tertiary);
                              box-shadow: 0 0 0 3px rgba(211,136,31,0.20); }
textarea { min-height: 160px; resize: vertical; }
.form-submit .btn { min-width: 160px; font-size: 1rem; padding: 0.85rem 2rem; }
.form-message { margin-top: 1rem; padding: 0.9rem 1.1rem; border-radius: var(--radius-sm);
                font-size: 0.92rem; display: none; }
.form-message.success { background: #0d2b0d; color: #6fcf6f; border: 1px solid #1a4a1a; }
.form-message.error   { background: #2b0d0d; color: #f08080; border: 1px solid #4a1a1a; }
.contact-aside h3 { font-size: 1.05rem; margin-bottom: 1.25rem; color: var(--primary); }
.contact-links { list-style: none; }
.contact-links li { margin-bottom: 0.75rem; }
.contact-link-item { display: flex; align-items: flex-start; gap: 0.75rem; padding: 1rem;
                     border: 1px solid var(--border); border-radius: var(--radius);
                     text-decoration: none; color: var(--text); background: var(--bg-card);
                     transition: border-color 0.15s, box-shadow 0.15s; }
.contact-link-item:hover { border-color: var(--tertiary);
                           box-shadow: 0 2px 10px rgba(211,136,31,0.15);
                           text-decoration: none; }
.contact-link-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 0.1rem; }
.contact-link-text strong { display: block; font-size: 0.88rem; font-weight: 700;
                            color: var(--primary); margin-bottom: 0.15rem; }
.contact-link-text span   { font-size: 0.82rem; color: var(--muted); }

/* ── Footer ── */
footer { background: var(--header-bg); color: rgba(255,255,255,0.6);
         padding: 3.5rem 0 2rem; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
               gap: 2rem; margin-bottom: 2.5rem; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; color: var(--white);
                font-weight: 700; margin-bottom: 0.75rem; }
.footer-brand img { width: 24px; height: 24px; border-radius: 3px; }
.footer-tagline { font-size: 0.85rem; color: rgba(255,255,255,0.4); line-height: 1.5; }
footer h4 { color: var(--tertiary); font-size: 0.8rem; letter-spacing: 0.1em;
            text-transform: uppercase; margin-bottom: 1rem; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 0.5rem; }
footer ul a { color: rgba(255,255,255,0.55); font-size: 0.88rem; }
footer ul a:hover { color: var(--tertiary); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1.5rem;
                 display: flex; justify-content: space-between; align-items: center;
                 flex-wrap: wrap; gap: 0.75rem; font-size: 0.8rem;
                 color: rgba(255,255,255,0.3); }
.footer-bottom a { color: rgba(255,255,255,0.3); }
.footer-bottom a:hover { color: var(--tertiary); }

/* ── CTA band (sub-pages) ── */
.cta-band { background: linear-gradient(145deg, #1f1a14 0%, #261e10 100%);
            border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
            padding: 4rem 0; text-align: center; }
.cta-band h2 { color: var(--white); margin-bottom: 1rem;
               font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-band p  { color: rgba(255,255,255,0.65); max-width: 540px;
               margin: 0 auto 2rem; }

/* ── Shared note/callout blocks ── */
.note-block { background: var(--bg-card); border: 1px solid var(--border);
              border-left: 4px solid var(--tertiary);
              border-radius: 0 var(--radius) var(--radius) 0;
              padding: 1.25rem 1.75rem; font-size: 0.95rem; color: var(--muted);
              line-height: 1.7; }
.note-block strong { color: var(--primary); }
.note-block--teal  { border-left-color: var(--selected); }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.7rem;
         font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
         padding: 0.2rem 0.6rem; border-radius: 4px; white-space: nowrap; flex-shrink: 0; }
.badge--green { background: rgba(58,125,68,0.18);  color: #6fcf6f;
                border: 1px solid rgba(58,125,68,0.4); }
.badge--amber { background: rgba(211,136,31,0.15); color: var(--tertiary);
                border: 1px solid rgba(211,136,31,0.35); }
.badge--grey  { background: rgba(85,85,85,0.25);   color: #aaa;
                border: 1px solid rgba(85,85,85,0.4); }

/* ════════════════════════════════════════════════════════════
   SOFTWARE SUITE PAGE
   ════════════════════════════════════════════════════════════ */

.sw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
           gap: 1.5rem; margin-bottom: 2.5rem; }
.sw-card { background: var(--bg-card); border: 1px solid var(--border);
           border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
           display: flex; flex-direction: column; }
.sw-card--featured { border-color: var(--tertiary); }
.sw-card-header { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem;
                  border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
.sw-card-logo { width: 40px; height: 40px; object-fit: contain;
                border-radius: 6px; flex-shrink: 0; }
.sw-card-title-group { flex: 1; }
.sw-card-title    { font-size: 1.05rem; font-weight: 700; color: var(--primary);
                    margin-bottom: 0.1rem; }
.sw-card-replaces { font-size: 0.78rem; color: var(--muted); }
.sw-card-replaces strong { color: var(--tertiary); font-weight: 600; }
.sw-card-body { padding: 1.25rem 1.5rem; flex: 1; font-size: 0.92rem; color: var(--muted);
                line-height: 1.7; }
.sw-card-body p { margin-bottom: 0.75rem; }
.sw-card-footer { padding: 0.75rem 1.5rem; border-top: 1px solid var(--border);
                  background: var(--bg-elevated); display: flex; align-items: center;
                  justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.sw-card-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.sw-card-links a { font-size: 0.82rem; font-weight: 600; color: var(--tertiary); }
.sw-use-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em;
              text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 4px;
              background: rgba(211,136,31,0.12); color: var(--tertiary);
              border: 1px solid rgba(211,136,31,0.3); white-space: nowrap; }

.sw-section-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em;
                    text-transform: uppercase; color: var(--tertiary);
                    margin: 3rem 0 1rem;
                    display: flex; align-items: center; gap: 0.75rem; }
.sw-section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.sw-section-intro { font-size: 0.95rem; color: var(--muted); max-width: 680px;
                    margin-bottom: 1.5rem; }

.criteria-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
                 gap: 1rem; margin-top: 2rem; }
.criterion { background: var(--bg-card); border: 1px solid var(--border);
             border-radius: var(--radius); padding: 1.1rem 1.4rem;
             display: flex; gap: 0.9rem; align-items: flex-start; }
.criterion-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 0.1rem; }
.criterion h4 { font-size: 0.9rem; color: var(--primary); margin-bottom: 0.2rem; }
.criterion p  { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* ════════════════════════════════════════════════════════════
   HOW IT WORKS PAGE
   ════════════════════════════════════════════════════════════ */

.sovereignty-loop { background: var(--bg-card); border: 1px solid var(--border);
                    border-left: 4px solid var(--tertiary);
                    border-radius: 0 var(--radius) var(--radius) 0;
                    padding: 1.5rem 2rem; font-size: 1rem; color: var(--muted);
                    line-height: 1.75; max-width: 780px; margin-bottom: 3rem; }
.sovereignty-loop strong { color: var(--primary); }
.sovereignty-loop .loop-items { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem;
                                margin-top: 1rem; list-style: none; }
.sovereignty-loop .loop-items li { font-size: 0.9rem; color: var(--tertiary);
                                   font-weight: 700; display: flex;
                                   align-items: center; gap: 0.4rem; }
.sovereignty-loop .loop-items li::before { content: '✓'; }

/* Diagram */
.diagram-wrap { max-width: 640px; margin: 0 auto; }
.diag-layer { display: grid; grid-template-columns: 3rem 3.5rem 1fr;
              align-items: center; border-radius: var(--radius-sm); overflow: hidden;
              border: 1px solid transparent; margin-bottom: 3px;
              transition: border-color 0.15s; }
.diag-layer:hover { border-color: var(--tertiary); }
.diag-layer:first-child { border-radius: var(--radius) var(--radius) var(--radius-sm) var(--radius-sm); }
.diag-layer:last-child  { border-radius: var(--radius-sm) var(--radius-sm) var(--radius) var(--radius); }
.diag-layer--1 { background: #1e2a1e; border-color: #2d472d; }
.diag-layer--2 { background: #1e241e; border-color: #344434; }
.diag-layer--3 { background: #221e1a; border-color: #423428; }
.diag-layer--4 { background: #261e12; border-color: #4a3418; }
.diag-layer--5 { background: #2a2012; border-color: #523c18; }
.diag-layer--6 { background: #2a1e10; border-color: #543818; }
.diag-layer--7 { background: #2e1c0c; border-color: var(--tertiary); }
.diag-num { display: flex; align-items: center; justify-content: center;
            font-size: 1.4rem; font-weight: 900; color: rgba(255,255,255,0.25);
            align-self: stretch; border-right: 1px solid rgba(255,255,255,0.06); }
.diag-layer--7 .diag-num { color: var(--tertiary); }
.diag-icon { display: flex; align-items: center; justify-content: center;
             font-size: 1.5rem; align-self: stretch;
             border-right: 1px solid rgba(255,255,255,0.06); }
.diag-body { padding: 0.85rem 1.1rem; }
.diag-title { font-size: 1rem; font-weight: 800; color: var(--primary); line-height: 1.2; }
.diag-sub   { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.diag-layer--7 .diag-title { color: var(--tertiary); }
.diag-arrow { display: flex; align-items: center; justify-content: center;
              height: 28px; position: relative; }
.diag-arrow::before { content: ''; display: block; width: 2px; height: 100%;
                      background: rgba(255,255,255,0.25); margin: 0 auto; }
.diag-arrow-label { position: absolute; font-size: 0.75rem; font-weight: 600;
                    letter-spacing: 0.06em; color: rgba(255,255,255,0.55);
                    background: var(--bg); padding: 0 0.6rem;
                    text-transform: uppercase; }
.diag-note { max-width: 640px; margin: 1.75rem auto 0;
             background: transparent; border: 1px dashed var(--border);
             border-radius: var(--radius-sm); padding: 1rem 1.25rem;
             font-size: 0.85rem; color: var(--muted);
             display: flex; gap: 0.75rem; align-items: flex-start; }
.diag-note-icon { font-size: 1.1rem; flex-shrink: 0; }

/* Layer accordion */
.layers-list { display: flex; flex-direction: column; gap: 2px; }
details.layer-item { background: var(--bg-card); border: 1px solid var(--border);
                     border-radius: var(--radius-sm); overflow: hidden; }
details.layer-item:first-child { border-radius: var(--radius) var(--radius) var(--radius-sm) var(--radius-sm); }
details.layer-item:last-child  { border-radius: var(--radius-sm) var(--radius-sm) var(--radius) var(--radius); }
details.layer-item[open]       { border-color: var(--tertiary); }
.layer-item > summary { display: flex; align-items: center; gap: 1rem;
                        padding: 1.1rem 1.5rem; cursor: pointer;
                        list-style: none; user-select: none; }
.layer-item > summary::-webkit-details-marker { display: none; }
.layer-item > summary:hover { background: var(--bg-elevated); }
.layer-badge { flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 50%;
               background: var(--bg-elevated); border: 1px solid var(--border);
               color: var(--tertiary); font-size: 0.75rem; font-weight: 800;
               display: flex; align-items: center; justify-content: center; }
.layer-item-icon   { font-size: 1.3rem; flex-shrink: 0; }
.layer-title-group { flex: 1; min-width: 0; }
.layer-title   { font-size: 1rem; font-weight: 700; color: var(--primary); }
.layer-tagline { font-size: 0.8rem; color: var(--muted); margin-top: 0.1rem; }
.layer-chevron { color: var(--tertiary); font-size: 1.25rem; line-height: 1;
                 flex-shrink: 0; transition: transform 0.2s; margin-left: auto;
                 font-weight: 700; }
details.layer-item[open] .layer-chevron { transform: rotate(180deg); }
.layer-body { padding: 0 1.5rem 1.5rem;
              border-top: 1px solid var(--border);
              font-size: 0.94rem; color: var(--muted); line-height: 1.75; }
.layer-body > p:first-child { padding-top: 1.25rem; }
.layer-body strong { color: var(--primary); }
.layer-sovereignty { margin-top: 1rem; padding: 0.75rem 1rem;
                     background: rgba(211,136,31,0.07);
                     border: 1px solid rgba(211,136,31,0.2);
                     border-radius: var(--radius-sm); font-size: 0.85rem;
                     color: var(--muted); }
.layer-sovereignty strong { color: var(--tertiary); }
.layer-options { display: inline-flex; align-items: center; gap: 0.35rem;
                 font-size: 0.78rem; background: var(--bg-elevated);
                 border: 1px solid var(--border); border-radius: 4px;
                 padding: 0.2rem 0.6rem; color: var(--muted); margin-top: 0.5rem; }

/* Who does what */
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
              margin-top: 2rem; }
.split-col  { background: var(--bg-card); border: 1px solid var(--border);
              border-radius: var(--radius); padding: 1.75rem; }
.split-col h3 { font-size: 1rem; margin-bottom: 1.25rem; padding-bottom: 0.75rem;
                border-bottom: 1px solid var(--border); }
.split-col ul { list-style: none; }
.split-col ul li { display: flex; align-items: flex-start; gap: 0.6rem;
                   padding: 0.45rem 0; border-bottom: 1px solid var(--border);
                   font-size: 0.9rem; color: var(--muted); }
.split-col ul li:last-child { border-bottom: none; }
.split-col ul li .icon { flex-shrink: 0; font-size: 1rem; }
.split-col--help { border-top: 3px solid var(--selected); }
.split-col--own  { border-top: 3px solid var(--tertiary); }

/* ════════════════════════════════════════════════════════════
   EXPERIENCE PAGE (experience.html)
   ════════════════════════════════════════════════════════════ */

/* Protocol badge strip */
.protocol-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0; }
.protocol-chip  { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
                  text-transform: uppercase; padding: 0.25rem 0.65rem;
                  border-radius: 20px; border: 1px solid var(--border);
                  color: var(--muted); background: var(--bg-elevated); }
.protocol-chip--active { border-color: var(--tertiary); color: var(--tertiary);
                         background: rgba(211,136,31,0.08); }

/* Client app cards */
.client-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
               gap: 1.25rem; margin-bottom: 2rem; }
.client-card { background: var(--bg-card); border: 1px solid var(--border);
               border-radius: var(--radius); padding: 1.5rem;
               display: flex; flex-direction: column; gap: 1rem;
               transition: border-color 0.15s; }
.client-card:hover { border-color: var(--tertiary); }
.client-card-header { display: flex; align-items: center; gap: 0.9rem; }
.client-logo { width: 44px; height: 44px; object-fit: contain;
               border-radius: 8px; flex-shrink: 0; }
.client-name { font-size: 1rem; font-weight: 700; color: var(--primary); }
.client-platforms { font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.client-body { font-size: 0.88rem; color: var(--muted); line-height: 1.65; flex: 1; }
.client-tag  { align-self: flex-start; font-size: 0.68rem; font-weight: 700;
               letter-spacing: 0.07em; text-transform: uppercase;
               padding: 0.2rem 0.6rem; border-radius: 4px; }
.client-tag--recommended { background: rgba(211,136,31,0.12); color: var(--tertiary);
                           border: 1px solid rgba(211,136,31,0.3); }
.client-tag--standard    { background: var(--bg-elevated); color: var(--muted);
                           border: 1px solid var(--border); }
.client-tag--opensource  { background: rgba(58,125,68,0.15); color: #6fcf6f;
                           border: 1px solid rgba(58,125,68,0.35); }

/* Feature rows (Nextcloud capabilities) */
.feature-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem;
                margin-bottom: 2rem; }
.feature-list li { display: flex; gap: 1rem; align-items: flex-start;
                   padding: 1rem 1.25rem; background: var(--bg-card);
                   border: 1px solid var(--border); border-radius: var(--radius-sm); }
.feature-list li .feat-icon { font-size: 1.4rem; flex-shrink: 0; }
.feature-list li .feat-body { flex: 1; }
.feature-list li .feat-title { font-size: 0.95rem; font-weight: 700;
                               color: var(--primary); margin-bottom: 0.2rem; }
.feature-list li .feat-desc  { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }

/* What changes / what doesn't */
.changes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
                margin-bottom: 2rem; }
.changes-col  { background: var(--bg-card); border: 1px solid var(--border);
                border-radius: var(--radius); padding: 1.75rem; }
.changes-col h3 { font-size: 1rem; margin-bottom: 1.25rem; padding-bottom: 0.75rem;
                  border-bottom: 1px solid var(--border); }
.changes-col ul { list-style: none; }
.changes-col ul li { display: flex; align-items: flex-start; gap: 0.6rem;
                     padding: 0.4rem 0; border-bottom: 1px solid var(--border);
                     font-size: 0.88rem; color: var(--muted); }
.changes-col ul li:last-child { border-bottom: none; }
.changes-col--same { border-top: 3px solid var(--selected); }
.changes-col--diff { border-top: 3px solid var(--tertiary); }

/* Signal callout */
.signal-block { background: var(--bg-card); border: 1px solid var(--border);
                border-left: 4px solid #3a76f0;
                border-radius: 0 var(--radius) var(--radius) 0;
                padding: 1.5rem 1.75rem; display: flex; gap: 1.25rem;
                align-items: flex-start; }
.signal-block-icon { font-size: 2rem; flex-shrink: 0; }
.signal-block h3 { font-size: 1rem; color: var(--primary); margin-bottom: 0.5rem; }
.signal-block p  { font-size: 0.9rem; color: var(--muted); line-height: 1.7; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .nav-links { display: none; flex-direction: column; position: absolute;
               top: 3.75rem; left: 0; right: 0; background: var(--header-bg);
               padding: 1rem; gap: 0.25rem;
               border-top: 1px solid rgba(255,255,255,0.1); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.7rem 1rem; }
  .nav-toggle { display: flex; }
  .about-grid    { grid-template-columns: 1fr; }
  .about-photo   { max-width: 260px; aspect-ratio: 1/1; }
  .contact-grid  { grid-template-columns: 1fr; }
  .contact-aside { order: -1; }
  .split-grid    { grid-template-columns: 1fr; }
  .changes-grid  { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .plan-table    { min-width: 480px; }
  .plan-table thead th:first-child { width: 30%; }
  .plan-table .feature-row td,
  .plan-table .cta-row td,
  .plan-table .row-group td { padding-left: 0.75rem; padding-right: 0.75rem; }
  .plan-col-header { padding: 1rem 0.75rem; }
}
@media (max-width: 560px) {
  .section       { padding: 3.5rem 0; }
  .hero-main     { padding: 4rem 0 3rem; }
  .hero-sub-page { padding: 3.5rem 0 2.5rem; }
  .footer-grid   { grid-template-columns: 1fr; }
  .sw-grid       { grid-template-columns: 1fr; }
  .client-grid   { grid-template-columns: 1fr; }
  .diag-sub      { display: none; }
}