/* ============================================================================
   1partilha. — public stylesheet
   ----------------------------------------------------------------------------
   The complete style layer for every public (non-backoffice) page. Written
   from design/1partilha.dc.html rather than as corrections on top of another
   sheet, which is why base_public.html now loads this file *alone*:

       fonts  →  public.css

   It replaces the previous three-sheet stack (page.min.css → app.css →
   partilha.css). That stack was an override layer: app.css stated a rounded,
   gradient, drop-shadow design against `--green`/`--dark` tokens, and
   partilha.css then re-pointed those tokens and corrected the ~150 rules that
   had hardcoded a colour, a radius or a shadow instead. Every rule here states
   what the concept asks for once, so nothing needs correcting and nothing needs
   !important to win.

   The backoffice is untouched: base_app.html still loads
   tabler.min.css → tabler-icons.min.css → partilha.css, and partilha.css keeps
   its Tabler bridge. No public page loads partilha.css any more.

   Because this file owns the whole public document, it can style `body`, `a`,
   `h1` and `table` directly — the old sheet had to scope everything to
   `.app-body` to avoid leaking into Tabler.

   ── Concept ────────────────────────────────────────────────────────────────
   bone #EFEBE0 · paper #F6F3EC · ink #0F1922
   olive #5E8C3A · brass #B88A44 · slate #6D7580 · muted #A9A398
   hairline rgba(15,25,34,.14) · radius 0 · no shadows
   Instrument Serif (display) · IBM Plex Sans 300/400/500 · IBM Plex Mono

   ── Contents ───────────────────────────────────────────────────────────────
    1 Tokens                    11 Hero (index)
    2 Reset & document          12 Share composer
    3 Typography                13 Share result
    4 Editorial primitives      14 Editorial sections (.ed-*)
    5 Layout                    15 Auth & gate cards
    6 Header                    16 Share view
    7 Footer                    17 Legal pages
    8 Buttons                   18 Pricing
    9 Form controls             19 API reference
   10 Notes, tags, steps        20 Help / extension / inbox
                                21 Utilities
                                22 Responsive
   ========================================================================== */


/* ── 1. Tokens ────────────────────────────────────────────────────────────── */

:root {
  /* Concept palette, named as the concept names it */
  --bone:        #EFEBE0;
  --paper:       #F6F3EC;
  --ink:         #0F1922;
  --olive:       #5E8C3A;
  --olive-deep:  #4A702E;
  --olive-lift:  #7FB05A;
  --brass:       #B88A44;
  --muted:       #A9A398;

  /* The concept's #6D7580 measures 3.9:1 on bone — under the 4.5:1 WCAG AA
     floor for body text. --slate is the same neutral a shade darker (4.6:1);
     --slate-soft keeps the concept's exact value for large and decorative
     type, where the 3:1 large-text threshold applies. */
  --slate:       #5F6771;
  --slate-soft:  #6D7580;

  /* Olive as a *text* colour reaches only 3.6:1 on paper, so links and inline
     accents take the deeper tone. #5E8C3A stays for bars, fills and display
     type. */
  --olive-text:  #4A702E;
  --brass-text:  #8A6420;

  --rule:        rgba(15, 25, 34, 0.14);
  --rule-strong: rgba(15, 25, 34, 0.28);

  --danger:      #A6352A;
  --danger-pale: #F2E2DF;
  --green-pale:  #E8EFDF;

  /* Team-branded share pages override this on .gate-card / .app-brand */
  --brand-accent: var(--olive);

  --font:         "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --measure:      1080px;
  --gutter:       24px;
  --transition:   0.2s ease;
}

/* The concept is light-only. This is its dark counterpart: ink becomes the
   ground, bone becomes the text, and olive lifts to hold contrast on ink
   (#8FBF5F on #0F1922 ≈ 8.3:1; the light olive would reach only 4.4:1). */
[data-theme="dark"] {
  --bone:        #0F1922;
  --paper:       #16222C;
  --ink:         #EFEBE0;
  --olive:       #8FBF5F;
  --olive-deep:  #6E9E44;
  --olive-lift:  #A7CF7C;
  --olive-text:  #A7CF7C;
  --brass:       #D4A85F;
  --brass-text:  #D4A85F;
  --slate:       #9AA3AE;
  --slate-soft:  #9AA3AE;
  --muted:       #6D7580;
  --rule:        rgba(239, 235, 224, 0.18);
  --rule-strong: rgba(239, 235, 224, 0.32);
  --danger:      #E08276;
  --danger-pale: #2A1614;
  --green-pale:  #16261A;
}


/* ── 2. Reset & document ──────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { margin: 0; padding: 0; list-style: none; }

img, svg, video { max-width: 100%; height: auto; display: block; }

input, textarea, select, button { font: inherit; color: inherit; }

table { border-collapse: collapse; }

::selection { background: var(--olive); color: var(--paper); }
::placeholder { color: var(--muted); opacity: 1; }

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

/* The mobile nav drawer locks the page behind it (partilha-shell.js). */
body.nav-drawer-open { overflow: hidden; }


/* ── 3. Typography ────────────────────────────────────────────────────────── */

/* Instrument Serif ships a single 400 weight, so any 600+ is a browser-
   synthesised faux bold. IBM Plex Sans is loaded at 300/400/500 for the same
   reason — nothing here asks for a weight that is not in the font. */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.14;
  color: inherit;
  text-wrap: pretty;
}

p { text-wrap: pretty; }

a {
  color: var(--ink);
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 3px;
  transition: color var(--transition), text-decoration-color var(--transition);
}

a:hover { color: var(--olive-text); text-decoration-color: var(--olive-text); }

strong, b { font-weight: 500; }

small { font-size: 0.85em; }

code, pre, kbd, samp { font-family: var(--font-mono); }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* Display type — the headline voice */
.display,
.ed-title,
.ed-cta-title,
.ed-card-title,
.ed-cell-t,
.ed-price,
.ed-step-t,
.page-title-ed,
.legal-title,
.pricing-title,
.gate-title,
.auth-title,
.view-title,
.hero-title,
.plan-name {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.14;
  color: inherit;
}

/* Metadata voice — mono, letterspaced, uppercase where it is a label */
.eyebrow,
.section-num,
.field-label,
.footer-col-title,
.card-eyebrow,
.reasons-title,
.api-section-title,
.api-group-title,
.inbox-label,
.cred-field-label,
.url-dest-label,
.legal-updated {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0;
}

.section-num,
.ed-card-code,
.ed-cell-n { color: var(--brass); }

.eyebrow { margin: 0 0 8px; }

.meta-mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.lede {
  font-size: 17px;
  line-height: 1.7;
  color: var(--slate);
  max-width: 60ch;
  margin: 0;
}


/* ── 4. Editorial primitives ──────────────────────────────────────────────── */
/* The concept's ornament vocabulary: a hairline, a short accent rule, a 3px
   bar at the head of a card, and § section numbering. */

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.accent-rule {
  width: 40px;
  height: 1px;
  background: var(--olive);
  margin: 0 0 32px;
}

.accent-rule-wide {
  width: 88px;
  height: 2px;
  background: var(--olive);
}

.accent-bar { height: 3px; background: var(--olive); }

.brand-dot { color: var(--olive); }

.eyebrow-accent { color: var(--olive-text); }
.eyebrow--inverted { color: var(--brass); }

/* Hairline grid — cells separated by a 1px gap showing the rule underneath,
   which is how the concept draws its twelve-feature block. */
.hairline-grid,
.ed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.hairline-grid > *,
.ed-cell { background: var(--paper); }

/* The ink slab that carries a secret, a key or a generated link */
.secret-panel {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.5;
  padding: 16px 18px;
  word-break: break-all;
}

/* Key/value rows — hairline separated, mono both sides */
.detail-rows {
  margin: 20px 0 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}

.detail-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--rule);
  padding: 11px 0;
}

.detail-rows dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.detail-rows dd {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-align: right;
  word-break: break-word;
}


/* ── 5. Layout ────────────────────────────────────────────────────────────── */

/* The measure. page.min.css supplied a 1200px .container; the concept is
   1080px, and this is now the only definition on the public site. */
.container {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Grid items default to min-width:auto, so an item containing a horizontally
   scrollable strip (the composer's five-type tab bar, a wide table) reports
   that strip's min-content as its own minimum and pushes the whole track past
   the viewport. On a 390px screen the hero track measured 400px for exactly
   this reason. Every auto-fit grid in this sheet opts out of that. */
.hero-container > *,
.ed-cards > *,
.ed-grid > *,
.ed-steps > *,
.ed-split > *,
.ed-cta-grid > *,
.hairline-grid > *,
.footer-inner > * { min-width: 0; }

/* Page opener. The header is sticky and in flow, so nothing here needs the
   64px clearance every page used to add for the old fixed bar. */
.page-head {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px);
}

.page-head .accent-rule { margin: 0 0 28px; }

.page-title-ed,
.legal-title,
.pricing-title {
  font-size: clamp(30px, 5.2vw, 48px);
  margin: 0 0 16px;
}


/* ── 6. Header ────────────────────────────────────────────────────────────── */
/* The concept's header: bone, sticky, one hairline underneath, a wordmark and
   a row of mono labels. Sticky rather than fixed — the old bar was
   position:fixed with no body padding, so seven pages each guessed their own
   64px clearance and two of them rendered their heading underneath it. */

.app-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bone) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.app-nav-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 13px var(--gutter);
  display: flex;
  align-items: center;
  gap: 10px 26px;
}

/* The wordmark is live text, not an image: one Instrument Serif word that
   inherits the theme's ink or bone and costs no request. The SVGs in
   static/img/brand serve the places with no webfont — favicon, OG, mail. */
.app-brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-right: auto;
  text-decoration: none;
  color: var(--ink);
}

.app-brand:hover { color: var(--ink); }

.brand-name,
.brand-team-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand-team-name { color: var(--brand-accent); }
.brand-sep { color: var(--slate); }
.brand-logo-img { height: 28px; width: auto; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-link-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  padding: 0.3rem 0;
  margin-right: 1.4rem;
  white-space: nowrap;
  transition: color var(--transition);
}

.nav-link-btn:hover { color: var(--olive-text); }

/* Primary call to action — an ink block, olive on hover */
.nav-link-primary {
  background: var(--ink);
  color: var(--bone);
  padding: 9px 16px;
  margin-right: 0;
  letter-spacing: 0.04em;
}

.nav-link-primary:hover { background: var(--olive-deep); color: var(--bone); }

/* Theme and language controls */
.dark-toggle-btn {
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 0.3rem 0.55rem;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--transition);
}

.dark-toggle-btn:hover { border-color: var(--olive); }

.lang-selector-wrap { position: relative; display: inline-block; }

.lang-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 0.4rem;
  min-width: 180px;
  z-index: 999;
  background: var(--paper);
  border: 1px solid var(--rule);
  overflow: hidden;
}

.lang-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  transition: background var(--transition);
}

.lang-opt:hover { background: var(--bone); }
.lang-opt.lang-active { background: var(--green-pale); color: var(--olive-text); }

/* Mobile drawer trigger */
.nav-hamburger {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 1px solid var(--rule);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--transition);
}

.nav-hamburger:hover { border-color: var(--olive); }

.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.22s ease, opacity 0.18s ease;
}

.nav-hamburger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }


/* ── 7. Footer ────────────────────────────────────────────────────────────── */
/* Four columns on paper, then a hairline row carrying the copyright and the
   composition credit set in the display italic — as the concept closes. */

.app-footer {
  margin-top: auto;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  color: var(--slate);
  padding: clamp(40px, 6vw, 64px) 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  gap: 34px 32px;
  align-items: start;
  padding-bottom: clamp(24px, 4vw, 36px);
}

.footer-brand .brand-name { font-size: 24px; }
.footer-brand .accent-rule { width: 56px; margin: 10px 0 14px; }

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--slate);
}

.footer-col,
.footer-links { display: flex; flex-direction: column; gap: 9px; }

.footer-col a,
.footer-links a {
  font-size: 14.5px;
  text-decoration: none;
  color: var(--ink);
}

.footer-col a:hover,
.footer-links a:hover { color: var(--olive-text); }

.footer-bottom {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(30px, 5vw, 44px);
}

.footer-bottom-inner {
  border-top: 1px solid var(--rule);
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slate);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--slate);
}

.footer-set {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
}

/* Form-submitting overlay */
.form-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.25rem;
}

.form-overlay.active { display: flex; }

.form-overlay-spinner {
  position: absolute;
  inset: 0;
  border: 2px solid color-mix(in srgb, var(--bone) 20%, transparent);
  border-top-color: var(--olive-lift);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.form-overlay-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bone) 70%, transparent);
}

@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--rule);
  border-top-color: var(--olive);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}


/* ── 8. Buttons ───────────────────────────────────────────────────────────── */
/* Flat ink, olive on hover. No gradient, no lift, no glow — and mono labels,
   as on the concept's own CTAs. */

.btn-submit,
.btn-confirm,
.btn-download,
.btn-new-share,
.btn-save-vault,
.btn-visit-link,
.btn-plan-primary,
.btn-cta {
  display: inline-block;
  background: var(--ink);
  color: var(--bone);
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  padding: 0.95rem 1.75rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-submit:hover,
.btn-confirm:hover:not(:disabled),
.btn-download:hover,
.btn-new-share:hover,
.btn-save-vault:hover,
.btn-visit-link:hover,
.btn-plan-primary:hover,
.btn-cta:hover {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--bone);
}

/* Disabled keeps the primary shape but goes inert. The ground is opaque slate
   rather than a translucent hairline colour: at 28% over paper the label was
   bone-on-almost-bone and effectively unreadable. */
.btn-submit:disabled,
.btn-confirm:disabled {
  background: var(--slate);
  border-color: var(--slate);
  color: var(--paper);
  cursor: not-allowed;
}

/* Secondary — a hairline box in the metadata voice */
.btn,
.btn-secondary,
.btn-preview-cancel,
.btn-plan-outline,
.btn-cta-ghost,
.btn-save-preset,
.preset-chip,
.content-copy-btn,
.cred-copy-btn,
.qr-download-btn,
.copy-btn,
.country-code-badge {
  display: inline-block;
  background: none;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.btn:hover,
.btn-secondary:hover,
.btn-preview-cancel:hover,
.btn-plan-outline:hover,
.btn-save-preset:hover,
.preset-chip:hover,
.content-copy-btn:hover,
.cred-copy-btn:hover,
.qr-download-btn:hover,
.copy-btn:hover {
  border-color: var(--olive);
  color: var(--olive-text);
}

.copy-btn.copied { border-color: var(--olive); color: var(--olive-text); }

/* Small hairline controls */
.content-copy-btn,
.cred-copy-btn,
.qr-download-btn,
.copy-btn,
.btn-save-preset,
.preset-chip,
.country-code-badge {
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.7rem;
  border-color: var(--rule);
}

.btn-submit--block,
a.btn-submit--block { display: block; width: 100%; margin-top: 0.5rem; }

/* Destructive */
.btn-danger,
.btn-submit-danger,
.btn-revoke {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--paper);
}

.btn-danger:hover,
.btn-submit-danger:hover,
.btn-revoke:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bone);
}

/* Inline secondary links */
.link-inline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--olive-text);
  text-decoration: none;
}

.link-inline:hover { text-decoration: underline; }

/* Show/hide password — a mono word, not a glyph */
.show-pwd-btn {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 0.2rem;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  cursor: pointer;
  z-index: 1;
}

.show-pwd-btn:hover { color: var(--ink); }


/* ── 9. Form controls ─────────────────────────────────────────────────────── */

.field-label {
  display: block;
  margin-bottom: 0.5rem;
}

.field-input,
.field-textarea,
.small-input,
.small-select,
.gate-input,
.result-url-input {
  width: 100%;
  background: var(--bone);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: 15.5px;
  line-height: 1.55;
  padding: 12px 13px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field-textarea,
.result-url-input,
.field-input--code,
.slug-input {
  font-family: var(--font-mono);
}

.field-textarea { resize: vertical; min-height: 6rem; }

.small-select,
.small-input {
  width: auto;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 11px 13px;
  appearance: none;
}

.small-input { width: 84px; text-align: center; }

.field-input:focus,
.field-textarea:focus,
.small-input:focus,
.small-select:focus,
.gate-input:focus {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.input-group-wrap { margin-bottom: 1.25rem; }

.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon .field-input { padding-right: 4.2rem; }

/* Emoji ornaments the concept does without. Hidden rather than deleted:
   several sit inside controls the Playwright suite matches by accessible
   name, and display:none keeps the markup while taking them out of both. */
.input-icon,
.tab-icon,
.option-icon,
.submit-icon,
.badge-icon,
.feature-icon,
.plan-icon,
.presets-label,
.gate-icon,
.auth-icon,
.enc-icon,
.result-icon,
.geo-icon,
.expired-icon,
.antiphish-icon,
.confirm-shield,
.status-icon,
.file-view-icon,
.file-drop-icon,
.file-sel-icon,
.inbox-icon,
.inbox-file-icon,
.success-icon,
.help-card-icon,
.preview-type-icon,
.dl-option-icon { display: none; }

.field-hint {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--slate);
  margin-top: 0.4rem;
}

.field-error {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--danger);
  margin-top: 0.4rem;
}

.req { color: var(--danger); }

input[type="checkbox"],
input[type="radio"] { accent-color: var(--olive); }

.cf-turnstile { margin: 0.75rem 0; }

/* Toggle switch — one of the few round things the concept keeps, because it
   reads as a mechanism rather than as chrome. The Playwright suite clicks
   `.toggle-switch:has(#x) .toggle-slider`, so the slider stays the hit area. */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--rule-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: var(--paper);
  border-radius: 50%;
  transition: transform var(--transition);
}

.toggle-switch input:checked + .toggle-slider { background: var(--olive); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-switch input:focus-visible + .toggle-slider { outline: 2px solid var(--olive); outline-offset: 2px; }


/* ── 10. Notes, tags, steps ───────────────────────────────────────────────── */

/* One shape — paper, hairline, a 3px coloured left rule — replacing a dozen
   hand-rolled pastel boxes. */
.note,
.legal-alert,
.help-tip,
.help-warn,
.ext-tip,
.ext-warn,
.burn-warning,
.antiphish-banner,
.encryption-notice,
.team-context-banner,
.inbox-security-note,
.revoke-box,
.gate-success,
.gate-error {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--olive);
  color: var(--slate);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: left;
}

.note strong,
.legal-alert strong,
.help-tip strong,
.help-warn strong,
.ext-tip strong,
.ext-warn strong,
.antiphish-banner strong,
.encryption-notice strong { color: var(--ink); font-weight: 500; }

.note--warn,
.help-warn,
.ext-warn,
.burn-warning,
.antiphish-banner.antiphish-warn { border-left-color: var(--brass); }

.note--danger,
.gate-error { border-left-color: var(--danger); }
.note--tip { border-left-color: var(--olive); }

.gate-success { color: var(--olive-text); }
.gate-error { color: var(--danger); }

/* The notes that open or interrupt a card carry their own space below. The
   help/extension variants set their own margins in the page's <style>, so they
   are deliberately absent from this list. */
.gate-success,
.gate-error,
.antiphish-banner,
.encryption-notice,
.burn-warning,
.team-context-banner { margin-bottom: 1.25rem; }

.antiphish-text { display: flex; flex-direction: column; gap: 0.15rem; }

/* State as a hairline tag rather than a filled pill */
.tag-mono,
.detail-tag,
.badge-new,
.view-type-badge,
.api-method-badge,
.dl-only-badge,
.plan-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  background: none;
  border: 1px solid var(--rule);
  padding: 0.34rem 0.7rem;
}

.tag-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.75rem; }

.tag-mono--ok,
.detail-tag.encrypted { border-color: var(--olive); color: var(--olive-text); }
.tag-mono--warn,
.detail-tag.warning { border-color: var(--brass); color: var(--brass-text); }
.tag-mono--danger { border-color: var(--danger); color: var(--danger); }
.tag-mono--neutral { border-color: var(--rule); color: var(--slate); }

.badge-new { border-color: var(--olive); color: var(--olive-text); font-size: 0.58rem; padding: 0.1rem 0.35rem; }

.view-type-badge { border-color: var(--olive); color: var(--ink); letter-spacing: 0.14em; }

/* Numbered steps — decimal-leading-zero in brass over a hairline, replacing
   the filled olive disc with white numerals. */
.steps {
  list-style: none;
  counter-reset: steps;
  padding: 0;
  margin: 0;
}

.steps > li {
  counter-increment: steps;
  border-top: 1px solid var(--rule);
  padding: 14px 0 14px 3.2rem;
  position: relative;
}

.steps > li::before {
  content: counter(steps, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--brass);
}

.reasons-list { list-style: none; padding: 0; margin: 0; }

.reasons-list li {
  border-top: 1px solid var(--rule);
  padding: 0.7rem 0;
  font-size: 0.9rem;
}

.reasons-title { margin-bottom: 0.6rem; }

/* The concept's list register: a hairline above each row, no chip, no fill.
   Used across help, the API reference and the extension page. */
.pillar-row {
  border-top: 1px solid var(--rule);
  padding-top: 0.7rem;
  margin-top: 0.7rem;
}

.pillar-row-title { font-size: 0.9rem; font-weight: 500; }

.pillar-row-note {
  display: block;
  color: var(--slate);
  font-size: 0.82rem;
  line-height: 1.5;
  margin-top: 0.15rem;
}

/* Option rows — checkbox, 14.5px title, mono note */
.option-row-title { font-size: 14.5px; line-height: 1.4; font-weight: 400; }

.option-row-note,
.option-nota {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--slate);
}


/* ── 11. Hero (index) ─────────────────────────────────────────────────────── */
/* The concept opens on an editorial column: eyebrow, display line, a wide
   accent rule, an italic serif promise, the plain-language paragraph, then the
   guarantees as hairline-topped mono rows. Beside it, the compose card. */

.hero-section { background: var(--bone); border-bottom: 1px solid var(--rule); }

/* The old design's gradient ground and floating particles have no equivalent
   in the concept; the markup stays, the ornament goes. */
.hero-bg,
.hero-particles { display: none; }

.hero-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(36px, 5vw, 64px);
  align-items: start;
  padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(40px, 6vw, 72px);
}

.hero-title {
  font-size: clamp(38px, 6.4vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
}

/* The concept keeps olive for rules and the full stop and says the emphasis
   with the display italic instead — an olive word beside an olive dot would be
   two accents in one line. */
.hero-highlight { color: inherit; font-style: italic; }

.hero-container .accent-rule-wide { margin: clamp(24px, 4vw, 36px) 0 22px; }

.hero-lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(22px, 3.6vw, 32px);
  line-height: 1.32;
  max-width: 20ch;
  margin: 0 0 18px;
}

.hero-subtitle {
  font-size: clamp(16px, 2.2vw, 17.5px);
  line-height: 1.68;
  max-width: 52ch;
  color: var(--ink);
  margin: 0 0 24px;
}

.hero-guarantees {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 46ch;
}

.badge-item {
  display: block;
  border-top: 1px solid var(--rule);
  padding-top: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--slate);
}


/* ── 12. Share composer ───────────────────────────────────────────────────── */

.share-card {
  background: var(--paper);
  border: 1px solid var(--rule);
}

.share-card .accent-bar { margin: 0; }

.form-section { padding: 24px 24px 28px; }

.card-eyebrow { margin: 0 0 16px; }

/* The presets strip is the app's own affordance — the concept has no
   equivalent, so it takes the metadata voice and steps out of the way. */
.presets-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0 0 12px;
}

.preset-del { color: var(--slate); cursor: pointer; font-size: 0.72rem; margin-left: 0.3rem; }
.preset-del:hover { color: var(--danger); }

/* Type strip — the concept's five buttons, hairline-gapped over the rule */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.tab-btn {
  flex: 1;
  min-width: 72px;
  background: var(--paper);
  border: 0;
  padding: 11px 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--slate);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.tab-btn:hover { background: var(--bone); color: var(--ink); }
.tab-btn.active { background: var(--ink); color: var(--bone); }

/* The first field needs air under the type strip */
.form-section .input-group-wrap { margin-top: 1.1rem; }

/* Advanced options — a hairline row in the metadata voice, not a filled pill */
.advanced-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: 1px solid var(--rule);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.advanced-toggle:hover { border-color: var(--ink); color: var(--ink); }
.toggle-arrow { font-size: 0.7rem; }

.advanced-panel {
  background: var(--bone);
  border: 1px solid var(--rule);
  margin-bottom: 1rem;
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--rule);
}

.option-row:last-child { border-bottom: none; }

.option-info { display: flex; align-items: center; gap: 0.75rem; flex: 1; }

.option-label { font-size: 14.5px; font-weight: 400; line-height: 1.4; }

.option-desc {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--slate);
  margin-top: 0.15rem;
}

.password-field,
.custom-slug-field,
.notify-field,
.geo-field {
  padding: 0.75rem 1.1rem 1rem;
  border-top: 1px solid var(--rule);
}

.slug-preview-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--rule);
  background: var(--bone);
}

.slug-preview-wrap:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink); }

.slug-prefix {
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  border-right: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
  white-space: nowrap;
}

.slug-input { border: 0 !important; box-shadow: none !important; }
.slug-input:focus { box-shadow: none !important; }

/* File drop target */
.file-drop-zone {
  border: 1px dashed var(--rule-strong);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: var(--bone);
  transition: border-color var(--transition);
}

.file-drop-zone:hover,
.file-drop-zone.dragover { border-color: var(--olive); }

.file-drop-inner { pointer-events: none; }
.file-drop-text { font-size: 0.95rem; margin-bottom: 0.3rem; }

.file-drop-hint,
.file-sel-size {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--slate);
}

.file-selected {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bone);
  border: 1px solid var(--olive);
}

.file-sel-info { flex: 1; min-width: 0; }

.file-sel-name {
  display: block;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-sel-remove {
  background: none;
  border: 0;
  color: var(--slate);
  cursor: pointer;
  padding: 0.25rem;
  flex-shrink: 0;
}

.file-sel-remove:hover { color: var(--danger); }

.url-favicon-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  margin-top: 0.4rem;
  background: var(--bone);
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--slate);
}

.url-favicon-img { width: 16px; height: 16px; flex-shrink: 0; }
.url-favicon-domain { color: var(--ink); }
.url-favicon-safe { margin-left: auto; color: var(--olive-text); }

/* Preview modal */
.preview-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.preview-modal {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.75rem;
  max-width: 460px;
  width: 100%;
}

.preview-modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.preview-type-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bone);
  border: 1px solid var(--rule);
  margin-bottom: 1rem;
}

.preview-type-name { font-size: 0.95rem; }

.preview-content-snippet,
.preview-option-value {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--slate);
  word-break: break-all;
}

.preview-options-grid { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.5rem; }

.preview-option-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.4rem;
}

.preview-option-icon { width: 20px; text-align: center; flex-shrink: 0; }
.preview-option-value { margin-left: auto; }

.preview-modal-actions { display: flex; gap: 0.75rem; }
.preview-modal-actions .btn-submit { flex: 1; }


/* ── 13. Share result ─────────────────────────────────────────────────────── */

.result-section { padding: 24px 24px 28px; }

.result-header { margin-bottom: 1.5rem; }

.result-title {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
}

.result-subtitle { color: var(--slate); font-size: 0.92rem; }

.result-url-box {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  margin-bottom: 1rem;
  background: var(--ink);
  padding: 0.5rem;
}

.result-url-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--bone);
  font-size: 13.5px;
  padding: 0.4rem 0.5rem;
}

.result-url-input:focus { box-shadow: none; }

.result-url-box .copy-btn {
  flex-shrink: 0;
  border-color: color-mix(in srgb, var(--bone) 40%, transparent);
  color: var(--bone);
}

.result-url-box .copy-btn:hover { border-color: var(--olive); color: var(--olive-lift); }

.result-details { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }

.result-qr {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border: 1px solid var(--rule);
}

.qr-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}

.revoke-details { border: 1px solid var(--danger); margin-bottom: 1rem; }

.revoke-details summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--danger);
  list-style: none;
}

.revoke-details summary::-webkit-details-marker { display: none; }
.revoke-details[open] summary { border-bottom: 1px solid var(--rule); }

.revoke-box { border: 0; border-left: 3px solid var(--danger); }
.revoke-warning { font-size: 0.82rem; color: var(--danger); margin-bottom: 0.75rem; }

.copy-btn-sm { padding: 0.35rem 0.6rem; }

.revoke-info-box { border: 1px solid var(--rule); margin-bottom: 0.5rem; text-align: left; }

.revoke-info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.85rem;
}

.revoke-info-row:last-child { border-bottom: none; }
.revoke-info-row span:first-child { color: var(--slate); font-family: var(--font-mono); font-size: 11.5px; }


/* ── 14. Editorial sections (.ed-*) ───────────────────────────────────────── */
/* The concept's page grammar: a 1080px measure, a section header
   (§ eyebrow → accent rule → serif title → slate lede), hairline-separated
   grids instead of gapped cards, and an inverted ink panel. */

.ed-section { border-top: 1px solid var(--rule); background: var(--bone); }
.ed-section:first-of-type { border-top: 0; }
.ed-section--paper { background: var(--paper); }

.ed-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(52px, 8vw, 96px) var(--gutter);
}

.ed-title {
  font-size: clamp(30px, 5.2vw, 48px);
  line-height: 1.14;
  margin: 0 0 16px;
  max-width: 22ch;
}

.ed-title--wide { max-width: 34ch; }

.ed-lede {
  font-size: 17px;
  line-height: 1.7;
  max-width: 60ch;
  color: var(--slate);
  margin: 0 0 clamp(32px, 5vw, 48px);
}

/* § numbering — brass on ink, slate on paper, as in the concept */
.ed-section--ink .eyebrow,
.ed-cta .eyebrow { color: var(--brass); }

/* Two-up cards, each with the 3px olive head bar */
.ed-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.ed-card {
  border: 1px solid var(--rule);
  background: var(--paper);
  display: flex;
  flex-direction: column;
}

.ed-card-body {
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.ed-card-code,
.ed-cell-n {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ed-card-title { font-size: 32px; line-height: 1.08; }
.ed-card-text { font-size: 16px; line-height: 1.65; }

.ed-card-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--slate);
  margin: 6px 0 0;
}

/* Definition rows */
.ed-defs {
  margin: 6px 0 0;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
}

.ed-def {
  border-bottom: 1px solid var(--rule);
  padding: 13px 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ed-def-t { font-size: 15px; font-weight: 400; }

.ed-def-n {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--slate);
}

/* Inverted panel — ink ground, bone type. Re-pointing --rule and --slate on
   the element itself means every hairline and secondary line inside follows
   with no per-child override.

   --ink is deliberately NOT re-pointed here. Custom properties resolve at
   computed-value time, so a `--ink:` declaration in this same block would feed
   back into the `background: var(--ink)` above it and paint the panel bone on
   bone. The two places inside that read --ink state their own value instead. */
.ed-section--ink,
.ed-cta {
  background: var(--ink);
  color: var(--bone);
  --rule: rgba(239, 235, 224, 0.28);
  --slate: rgba(239, 235, 224, 0.68);
}

/* In dark the panel inverts the other way: --ink is bone, so this is now a
   *light* panel on a dark page. Its accents have to flip back to the light
   palette with it — the dark-theme brass (#D4A85F) and lifted olive (#A7CF7C)
   are tuned for an ink ground and drop to ~1.8:1 and ~1.5:1 on bone. */
[data-theme="dark"] .ed-section--ink,
[data-theme="dark"] .ed-cta {
  --rule: rgba(15, 25, 34, 0.20);
  --slate: #5F6771;
  --brass: #8A6420;
  --olive: #5E8C3A;
  --olive-lift: #4A702E;
}

/* Numbered progression (§ 02 in the concept) */
.ed-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 28px 32px;
}

.ed-step {
  border-top: 1px solid var(--rule);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ed-step-n {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--olive);
}

.ed-section--ink .ed-step-n { color: var(--olive-lift); }

.ed-step-t { font-size: 23px; line-height: 1.16; letter-spacing: -0.012em; }
.ed-step-x { font-size: 14.5px; line-height: 1.6; color: var(--slate); }

/* Twelve-feature block */
.ed-cell {
  padding: 24px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ed-section--paper .ed-cell { background: var(--bone); }

.ed-cell-t { font-size: 22px; line-height: 1.18; letter-spacing: -0.012em; }
.ed-cell-x { font-size: 14.5px; line-height: 1.62; color: var(--slate); }

/* Comparison table */
.ed-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  background: var(--bone);
}

.ed-table { width: 100%; min-width: 640px; }

.ed-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--slate);
  padding: 16px 18px;
  border-bottom: 2px solid var(--olive);
  white-space: nowrap;
}

.ed-table thead .ed-th-us {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.ed-table tbody th {
  text-align: left;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  padding: 15px 18px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.ed-table td {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--slate);
}

.ed-table td.ed-td-us { color: var(--ink); }

.ed-table-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 16px 0 0;
  max-width: 60ch;
}

/* Price block */
.ed-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.ed-price {
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  margin: 0 0 18px;
}

.ed-panel {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 26px 24px;
}

.ed-section--paper .ed-panel { background: var(--bone); }
.ed-panel .accent-rule { width: 32px; margin-bottom: 16px; }

.ed-rows { display: flex; flex-direction: column; }

.ed-row {
  border-top: 1px solid var(--rule);
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14.5px;
}

.ed-row-v {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--slate);
  text-align: right;
  white-space: nowrap;
}

/* Closing panel (§ 06) */
.ed-cta { padding: clamp(36px, 6vw, 64px); }

.ed-cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(28px, 5vw, 56px);
  align-items: end;
}

.ed-cta-title {
  font-size: clamp(30px, 5.2vw, 50px);
  line-height: 1.1;
  letter-spacing: -0.024em;
  margin: 0 0 16px;
}

.ed-cta-lede {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--slate);
  margin: 0 0 26px;
  max-width: 44ch;
}

.ed-pairs { display: flex; flex-direction: column; gap: 16px; }
.ed-pair { border-top: 1px solid var(--rule); padding-top: 12px; }

.ed-pair dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 5px;
}

.ed-pair dd { font-size: 16.5px; line-height: 1.5; }

.ed-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* On the inverted panel the primary action flips to bone — an ink button on
   ink would disappear. Both land on olive when hovered. The label colour is
   the ground the panel sits on, so it is stated as a literal rather than as
   var(--ink), which the panel does not re-point (see the note above). */
.ed-cta .btn-cta,
.ed-section--ink .btn-cta {
  background: var(--bone);
  border-color: var(--bone);
  color: #0F1922;
}

[data-theme="dark"] .ed-cta .btn-cta,
[data-theme="dark"] .ed-section--ink .btn-cta { color: #EFEBE0; }

.btn-cta-ghost {
  background: none;
  color: var(--bone);
  border-color: color-mix(in srgb, var(--bone) 45%, transparent);
}

.btn-cta-ghost:hover { border-color: var(--olive); color: var(--olive); }


/* ── 15. Auth & gate cards ────────────────────────────────────────────────── */
/* One centred card on bone. The concept is left-aligned throughout, so none of
   these centre their contents the way the old design did. */

.gate-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 7vw, 80px) var(--gutter);
  background: var(--bone);
}

.gate-card {
  --card-pad-y: 2.5rem;
  --card-pad-x: 2rem;
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: var(--card-pad-y) var(--card-pad-x);
  text-align: left;
}

/* The concept's one card ornament, pulled out to the card's own edges */
.gate-card::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--olive);
  margin: calc(-1 * var(--card-pad-y)) calc(-1 * var(--card-pad-x)) var(--card-pad-y);
}

.auth-card { max-width: 440px; }
.view-card { max-width: 640px; }
.error-card { max-width: 520px; }
.confirm-gate-card { --card-pad-y: 0; --card-pad-x: 0; }

.gate-title,
.auth-title { font-size: clamp(28px, 4.4vw, 38px); margin: 0 0 0.75rem; }

.gate-subtitle,
.auth-subtitle { color: var(--slate); margin-bottom: 2rem; }

.auth-header { margin-bottom: 2rem; }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-field { display: flex; flex-direction: column; gap: 0.35rem; }

.gate-form { text-align: left; }

/* "Already have an account?" and friends */
.auth-aside,
.auth-alt,
.auth-legal,
.error-hint {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin-top: 1rem;
  text-align: left;
}

.auth-aside p { margin-bottom: 0.35rem; }
.auth-alt a, .auth-legal a { color: var(--olive-text); }

.gate-back {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--slate);
  text-decoration: none;
}

.gate-back:hover { color: var(--olive-text); }

.gate-expiry,
.confirm-expiry,
.decrypt-status,
.platform-disclaimer,
.file-unavailable {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.decrypt-status { display: flex; align-items: center; gap: 0.75rem; padding: 1.5rem 0; }

.error-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.recovery-code-item,
.field-input--code,
.expiry-countdown,
.gate-expiry-value,
.confirm-expiry-value { font-family: var(--font-mono); }

.expiry-countdown { font-variant-numeric: tabular-nums; }

.approve-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }


/* ── 16. Share view ───────────────────────────────────────────────────────── */

.view-title { font-size: clamp(24px, 3.6vw, 32px); margin-bottom: 1.25rem; }

.confirm-body { padding: 2rem 2.5rem; }
/* On the confirmation gate the banner is the card's own header: full bleed to
   the card edges, with .confirm-body directly under it. */
.confirm-gate-card .antiphish-banner {
  border-top: 0;
  border-right: 0;
  margin-bottom: 0;
}
.confirm-meta-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.confirm-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.25rem; }

.confirm-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.5;
  cursor: pointer;
}

.confirm-checkbox-label input { margin-top: 0.25rem; width: 16px; height: 16px; flex-shrink: 0; }

.content-box {
  background: var(--bone);
  border: 1px solid var(--rule);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.content-actions { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }

.content-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  max-height: 400px;
  overflow-y: auto;
  margin: 0;
}

.blurred,
.cred-blurred { filter: blur(6px); user-select: none; transition: filter 0.3s; }

.credentials-card { border: 1px solid var(--rule); margin-bottom: 1.25rem; }

.cred-field-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.cred-field-row:last-child { border-bottom: none; }
.cred-field-label { min-width: 110px; flex-shrink: 0; }
.cred-field-value-wrap { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; }

.cred-field-value {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  word-break: break-all;
}

.file-view-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem;
  background: var(--bone);
  border: 1px solid var(--rule);
  margin-bottom: 1.5rem;
}

.file-view-info { flex: 1; min-width: 0; }
.file-view-name { font-size: 1rem; word-break: break-all; }
.file-view-size { font-family: var(--font-mono); font-size: 11.5px; color: var(--slate); margin-top: 0.2rem; }
.file-view-mime { font-family: var(--font-mono); font-size: 11px; color: var(--slate); margin-top: 0.1rem; }

.url-destination-card {
  background: var(--bone);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.url-dest-label { margin-bottom: 0.5rem; }
.url-dest-value { margin-bottom: 1rem; }

.platform-disclaimer {
  border-top: 1px solid var(--rule);
  padding-top: 0.85rem;
  margin: 1.25rem 0;
  line-height: 1.5;
}

.branded-footer { padding: 1rem 0; }

.btn-save-vault { margin-bottom: 0.75rem; }
.btn-new-share { display: block; width: 100%; }


/* ── 17. Legal pages ──────────────────────────────────────────────────────── */

/* privacy, terms and the API reference open straight into .legal-container
   rather than through .page-head, so the opening rhythm is stated here. */
.legal-page {
  flex: 1;
  background: var(--bone);
  padding: clamp(40px, 6vw, 72px) 0 clamp(40px, 6vw, 72px);
}

.legal-container { max-width: 800px; margin: 0 auto; padding: 0 var(--gutter); }

.legal-title { margin-bottom: 0.4rem; }
.legal-updated { margin-bottom: 1.75rem; }
.legal-alert { margin-bottom: 2rem; }

.legal-section {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.legal-section h2 { font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: 0.75rem; }

.legal-section p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--slate);
  margin-bottom: 0.6rem;
}

.legal-section p:last-child { margin-bottom: 0; }
.legal-section a { color: var(--olive-text); }


/* ── 18. Pricing ──────────────────────────────────────────────────────────── */
/* The concept sets a price the way it sets a headline, and separates the plans
   with the hairline grid rather than floating three gapped cards. */

.pricing-grid { margin-bottom: 0; }

.pricing-card {
  background: var(--paper);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.pricing-header { margin-bottom: 1.5rem; text-align: left; }

.plan-name { font-size: 1.6rem; margin: 0.5rem 0; }
.plan-price { margin-bottom: 0.5rem; }

.price-amount {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 60px);
  letter-spacing: -0.028em;
  line-height: 1;
}

.price-period { font-family: var(--font-mono); font-size: 12px; color: var(--slate); }
.plan-desc { color: var(--slate); font-size: 0.9rem; }

.plan-features { list-style: none; padding: 0; margin: 0 0 1.5rem; flex: 1; }

.plan-features li {
  border-top: 1px solid var(--rule);
  padding: 0.7rem 0;
  font-size: 0.9rem;
}

.btn-plan { display: block; width: 100%; }

.coming-soon-ribbon {
  display: inline-block;
  background: var(--olive);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.55rem 1.25rem;
  margin-top: 0.75rem;
}

.compare-table-wrap { max-width: var(--measure); margin: 0 auto; }

/* Elsewhere an .ed-lede sets the table off from its heading; this section has
   none, so the title ran into the table on its 16px margin alone. */
.compare-table-wrap > .ed-table-wrap { margin-top: clamp(28px, 4vw, 44px); }

/* Thirteen rows across four columns does not fit a phone, so the table scrolls
   inside .ed-table-wrap rather than taking the page with it. */
.compare-table { width: 100%; min-width: 560px; }

.compare-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  text-align: center;
  padding: 16px 18px;
  border-bottom: 2px solid var(--olive);
  background: none;
}

.compare-table thead th:first-child { text-align: left; }

.compare-table td {
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--rule);
  color: var(--slate);
}

.compare-table td:first-child { text-align: left; font-family: var(--font); font-size: 15px; color: var(--ink); }

/* The featured column is marked by weight, not by a tinted fill */
.th-featured,
.td-featured { background: none; color: var(--ink); font-weight: 500; }


/* ── 19. API reference ────────────────────────────────────────────────────── */

.api-docs-page { flex: 1; }
.api-title { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: 1.25rem; }
.api-subtitle { color: var(--slate); }

.api-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin-bottom: 2rem;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.api-tab {
  flex: 1;
  min-width: 160px;
  background: var(--paper);
  border: 0;
  padding: 11px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--slate);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.api-tab:hover { background: var(--bone); color: var(--ink); }
.api-tab.active { background: var(--ink); color: var(--bone); }

.api-endpoint {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.api-path { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 500; margin-bottom: 0.75rem; }
.api-desc { color: var(--slate); font-size: 0.9rem; margin-bottom: 1.25rem; }

.api-section-title { margin: 1.25rem 0 0.5rem; border-bottom: 0; }

/* Group headings become the metadata voice over an accent rule */
.api-group-title { margin: 2.5rem 0 1rem; padding-bottom: 0; border-bottom: 0; }

.api-group-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--olive);
  margin-top: 10px;
}

/* Method badges — hairline tags, one hue each, no pastel fills. Both naming
   schemes: app.css used .api-method-get, api_docs.html writes .get */
.api-method-badge { font-size: 10.5px; font-weight: 500; margin-bottom: 0.5rem; }

.api-method-get,
.api-method-badge.get    { border-color: var(--olive);  color: var(--olive-text); }
.api-method-post,
.api-method-badge.post   { border-color: var(--ink);    color: var(--ink); }
.api-method-put,
.api-method-patch,
.api-method-badge.put,
.api-method-badge.patch  { border-color: var(--brass);  color: var(--brass-text); }
.api-method-delete,
.api-method-badge.delete { border-color: var(--danger); color: var(--danger); }

/* Terminal blocks keep an ink ground — the concept uses one for the created
   link — but the lime-on-black was the old palette. */
.code-block {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  padding: 1.25rem;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}

[data-theme="dark"] .code-block { background: #0B131A; color: #EFEBE0; }

.inline-code,
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  color: var(--brass-text);
}

.inline-code {
  background: var(--bone);
  border: 1px solid var(--rule);
  padding: 0.1em 0.35em;
  color: var(--ink);
}


/* ── 20. Help / extension / inbox ─────────────────────────────────────────── */

.help-card,
.inbox-card,
.success-card,
.apikey-card {
  background: var(--paper);
  border: 1px solid var(--rule);
}

.apikey-value { font-family: var(--font-mono); word-break: break-all; }

/* The inbox and success pages swap out the default body class, so their page
   shells state their own flex column — see the <style> block in each. */
.inbox-page,
.success-page { min-height: 100vh; }

.inbox-label { display: block; margin-bottom: 0.4rem; }

.star-fav { color: var(--brass); font-size: 1.15rem; line-height: 1; }
.star-fav--off { color: var(--slate); opacity: 0.45; }
.type-glyph { font-size: 1.3rem; color: var(--slate); }


/* ── 21. Utilities ────────────────────────────────────────────────────────── */

.hidden { display: none !important; }

.text-muted { color: var(--slate); }

.success-measure { max-width: 600px; }

.brand-sep { margin: 0 0.5rem; }

a.btn-submit,
a.btn-new-share,
a.btn-save-vault { text-decoration: none; }


/* ── 22. Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .app-nav-inner { padding: 11px 16px; }
  .brand-name { font-size: 19px; }
  .nav-actions { gap: 0.35rem; }

  .nav-hamburger { display: flex; }

  /* The drawer. Below 768px .nav-links is a fixed panel under the bar, kept
     pointer-events:none until partilha-shell.js sets .mob-open. */
  .nav-links {
    position: fixed;
    top: 62px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bone);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem 0.75rem 0.85rem;
    max-height: calc(100dvh - 62px);
    overflow-y: auto;
    z-index: 99;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.18s ease;
  }

  .nav-links.mob-open { transform: translateY(0); opacity: 1; pointer-events: auto; }

  .nav-links .nav-link-btn {
    display: block;
    margin: 0.2rem 0;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--rule);
    text-align: left;
  }

  .nav-links .nav-link-primary { border-bottom: 0; text-align: center; }

  .hero-container { padding: clamp(32px, 8vw, 48px) 16px 40px; }
  .hero-title { letter-spacing: -0.02em; }
  .form-section,
  .result-section { padding: 20px 16px 24px; }

  .tab-bar { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab-btn { flex: 1 0 auto; }

  .ed-cta-grid { align-items: start; }
  .confirm-body { padding: 1.5rem 1.25rem; }
  .gate-card { --card-pad-y: 2rem; --card-pad-x: 1.5rem; }
  .container { padding: 0 16px; }
  .ed-inner { padding: clamp(40px, 8vw, 64px) 16px; }
}

@media (max-width: 600px) {
  .result-url-box { flex-direction: column; }
  .result-url-box .copy-btn { width: 100%; }
  .cred-field-row { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .cred-field-label { min-width: auto; }
  .footer-bottom-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  .approve-actions { grid-template-columns: 1fr; }
  .preview-modal-actions { flex-direction: column; }
}

/* Someone who asked the OS not to animate gets no animation here either. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
