/* Global design system · v1.29
   Shared neutrals, typography, spacing, shapes and components for nutt.ai/nutt.io,
   productivity.nexus and notion.vip. Load brand.js before this sheet.
   Domain palettes are selected by data-brand on the root element.
   The --nl- prefix is retained for compatibility with existing consumers. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Neutrals */
  --nl-text: #15171a;
  --nl-muted: #4d535c;
  --nl-faint: #676e78;
  --nl-placeholder: #a4aab3;
  --nl-line: #eaecef;
  --nl-border: #d4d6da;
  --nl-border-hover: #b9bfc7;
  --nl-surface: #ffffff;
  --nl-surface-2: #f3f4f6;
  --nl-hover: #f5f6f8;
  --nl-selected: #e6e8ec;
  --nl-error: #a61b1b;
  --nl-scrim: rgba(17, 20, 26, .45);

  /* Compatibility aliases for existing components and Worker pages. */
  --nl-green: var(--brand-accent);
  --nl-focus: var(--brand-focus);
  --nl-ring: var(--brand-ring);
  --nl-link: var(--brand-link);
  --nl-mint-text: var(--brand-callout-text);
  --nl-mint-bg: var(--brand-callout-bg);
  --nl-mint-border: var(--brand-callout-border);
  --nl-mint-gradient: var(--brand-callout-gradient);
  --nl-plus-gradient: var(--brand-badge-gradient);
  --nl-ring-error: rgba(166, 27, 27, .12);

  /* Type */
  --nl-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --nl-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Shape */
  --nl-radius: 8px;
  --nl-field-h: 40px;

  /* Forms */
  --nl-form-logo-gap: 48px;
  --nl-form-paragraph-gap: 4px;
  --nl-form-section-size: 25px;
  --nl-form-label-size: 17px;
  --nl-form-hint-size: 14px;
  --nl-form-hint-lift: 6px;
  --nl-form-hint-field-gap: 8px;
  --nl-form-placeholder-size: 14px;
  --nl-form-placeholder-opacity: 1;
  --nl-page-corner: 24px;
  --nl-form-textarea-tall: 184px;
  --nl-form-submit-gap: 16px;
  --nl-form-section-rule-width: 1px;
  --nl-form-section-title-gap: 10px;
  --nl-form-section-field-gap: 4px;
}

/* Platform-independent primitives */
body { font-family: var(--nl-font); color: var(--nl-text); }
a { color: var(--brand-link); }
.brand-logo { width: var(--brand-logo-width); max-width: 100%; height: auto; object-fit: contain; }
/* callout */
.nl-callout,
[data-nl-style~="callout"] {
  background: var(--nl-mint-gradient) !important;
  border: 1px solid var(--nl-mint-border) !important;
  border-radius: var(--nl-radius) !important;
  padding: 18px 22px !important;
  color: var(--nl-mint-text) !important;
  font-style: normal !important;
  line-height: 1.5 !important;
}
.nl-callout *,
[data-nl-style~="callout"] * { font-size: inherit !important; font-style: normal !important; color: inherit !important; }
.nl-callout a,
[data-nl-style~="callout"] a {
  font-weight: 600 !important;
  text-decoration: underline !important;
  text-decoration-color: currentColor !important;
  text-underline-offset: 2px;
  border-bottom: 0 !important;
}

/* small (modifier) */
.nl-small,
[data-nl-style~="small"] { font-size: 14.5px !important; }

/* Domain palettes: one authoritative value set per brand. */
/* Nutt Labs · v1.0 · Brand colors and logo only.
   Palette: existing Nutt Labs design tokens.
   Callout tints derived from the brand palette. */
:root {
  --brand-accent: #4BEFA7;
  --brand-focus: #00A676;
  --brand-ring: rgba(75,239,167,.35);
  --brand-link: #00C08B;
  --brand-callout-text: #0F6B4C;
  --brand-callout-bg: #EAFBF3;
  --brand-callout-border: #C9EEDD;
  --brand-callout-gradient: linear-gradient(135deg, #D9F7EC, #ECFCF4 55%, #E0F9E4);
  --brand-badge-gradient: linear-gradient(45deg, #00E2A9, #85F4A6);
  --brand-logo: url("https://flywheel.nutt.ai/brand/nutt-labs-logo-dark.png");
  --brand-logo-width: 180px;
}

/* Productivity Nexus · v1.0 · Brand colors and logo only.
   Palette: existing Productivity Nexus public website.
   Callout tints derived from the brand palette. */
:root[data-brand="productivity-nexus"] {
  --brand-accent: #ff82c2;
  --brand-focus: #5200ff;
  --brand-ring: rgba(82,0,255,.2);
  --brand-link: #5200ff;
  --brand-callout-text: #371080;
  --brand-callout-bg: #f4efff;
  --brand-callout-border: #ded0ff;
  --brand-callout-gradient: linear-gradient(135deg, #f4efff, #fff0f7);
  --brand-badge-gradient: linear-gradient(45deg, #5200ff, #ff82c2);
  --brand-logo: url("https://flywheel.nutt.ai/brands/productivity-nexus/logo-chrome.svg?v=1.0");
  --brand-logo-width: 260px;
}

/* Notion VIP · v1.0 · Brand colors and logo only.
   Palette: existing Notion VIP public website.
   Callout tints derived from the brand palette. */
:root[data-brand="notion-vip"] {
  --brand-accent: #DE5783;
  --brand-focus: #985EF4;
  --brand-ring: rgba(152,94,244,.25);
  --brand-link: #a73960;
  --brand-callout-text: #4d258e;
  --brand-callout-bg: #f5efff;
  --brand-callout-border: #e1d1fa;
  --brand-callout-gradient: linear-gradient(135deg, #f5efff, #fff0f5);
  --brand-badge-gradient: linear-gradient(45deg, #985EF4, #DE5783);
  --brand-logo: url("https://flywheel.nutt.ai/brands/notion-vip/logo.svg");
  --brand-logo-width: 190px;
}

/* Shared Tally adapter. Selectors are scoped to Tally elements. */
/* ---------- Base ---------- */
html, .tally-app { background-color: var(--nl-surface); }
.tally-app, .tally-app input, .tally-app textarea, .tally-app button { font-family: var(--nl-font) !important; }
.tally-app { color: var(--nl-text); }

/* ---------- Text ---------- */
.tally-block-form-title h1 { font-size: 40px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; color: var(--nl-text); padding-bottom: 16px !important; }
.tally-block-text { color: var(--nl-muted); }
.tally-app .tally-block-text .tally-text:not([data-nl-style]) a { color: var(--nl-link) !important; text-decoration-color: currentColor !important; }
.tally-block-text b, .tally-block-text strong, .tally-block-text [style*="font-weight: bold"] { font-weight: 600 !important; }
/* Intro: the text blocks directly under the form title */
.tally-block-form-title + .tally-block-text,
.tally-block-form-title + .tally-block-text + .tally-block-text { font-size: 17px; line-height: 1.55; color: var(--nl-text); }
.tally-block-form-title + .tally-block-text + .tally-block-text { padding-top: var(--nl-form-paragraph-gap) !important; }
/* Style-tag definitions are shared above; this spaces their Tally blocks. */
.tally-app .tally-block-text:has(> [data-nl-style~="callout"]) { padding-top: 28px !important; }
.tally-block-heading-2 h2 { font-size: var(--nl-form-section-size); font-weight: 600; letter-spacing: -.01em; color: var(--nl-text); }
/* Plain section headings share one full-width title rule. */
.tally-block-heading-2:not([data-nl-sec]) {
  width: 100%; padding-top: 36px !important;
  padding-bottom: var(--nl-form-section-field-gap) !important;
  margin-bottom: -12px !important; border-bottom: 0;
}
.tally-block-heading-2:not([data-nl-sec]) div:has(> h2) { width: 100%; }
.tally-block-heading-2:not([data-nl-sec]) h2 {
  width: 100%;
  margin-bottom: 0 !important;
  padding-bottom: var(--nl-form-section-title-gap) !important;
  border-bottom: var(--nl-form-section-rule-width) solid var(--nl-line);
}

/* Field label */
.tally-block-title h3, .tally-block-label { font-size: var(--nl-form-label-size) !important; line-height: 1.35 !important; font-weight: 500 !important; color: var(--nl-text); }
/* Hint: a text block directly under a field label */
.tally-block-title + .tally-block-text { margin-top: calc(var(--nl-form-hint-lift) * -1) !important; padding-bottom: var(--nl-form-hint-field-gap) !important; font-size: var(--nl-form-hint-size); line-height: 1.45; color: var(--nl-muted); }
/* Tally reserves editor-line height even for a one-line hint. Let content size itself
   so the configured instruction-to-control gap stays independent of line count. */
.tally-block-title + .tally-block-text > .tally-text { min-height: 0; }

/* Replace Tally’s required asterisk with the host-brand badge. */
.tally-required-indicator { position: static !important; display: inline-flex !important; align-items: center; width: auto !important; height: auto !important; margin-left: 8px; font-size: 0 !important; color: transparent !important; background: transparent !important; box-shadow: none !important; }
.tally-required-indicator > * { display: none !important; }
.tally-required-indicator::after {
  content: "Required";
  display: inline-block; font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap;
  color: var(--nl-mint-text); background: var(--nl-mint-bg);
  border-radius: 999px; padding: 4px 8px; letter-spacing: 0;
}

/* ---------- Inputs (text, email, number, link, date, time, phone, dropdown, textarea) ---------- */
.tally-app div[class*=' tally-block-input'] input,
.tally-app .tally-block-dropdown input,
.tally-app .tally-block-textarea textarea,
.tally-app .tally-other-option-input {
  min-height: var(--nl-field-h);
  border: 1px solid var(--nl-border) !important;
  border-radius: var(--nl-radius) !important;
  background-color: var(--nl-surface) !important;
  color: var(--nl-text);
  font-size: 15px;
  box-shadow: none !important;
  transition: border-color .15s, box-shadow .15s;
}
.tally-app .tally-block-textarea textarea { min-height: 104px; line-height: 1.5; }
.tally-app input::placeholder, .tally-app textarea::placeholder { color: var(--nl-placeholder); opacity: var(--nl-form-placeholder-opacity); }
/* Placeholders stay quiet without changing the input text. */
.tally-app .tally-block-textarea textarea::placeholder { font-size: var(--nl-form-placeholder-size); line-height: 1.6; }


.tally-app div[class*=' tally-block-input'] input:hover,
.tally-app .tally-block-dropdown input:hover,
.tally-app .tally-block-textarea textarea:hover { border-color: var(--nl-border-hover) !important; }

.tally-app .tally-block input:focus,
.tally-app .tally-block input:focus-within,
.tally-app .tally-block textarea:focus,
.tally-app .tally-block textarea:focus-within {
  border-color: var(--nl-focus) !important;
  box-shadow: 0 0 0 3px var(--nl-ring) !important;
  outline: none;
}

/* ---------- Choices ---------- */
.tally-multiple-choice-option > div, .tally-checkbox > div { border-radius: var(--nl-radius); }
.tally-multiple-choice-option .tally-enumeration-badge { display: none; }
/* Choice cards retain accents; checkbox rows stay neutral. */
.tally-multiple-choice-option:hover > div { box-shadow: var(--brand-callout-border) 0 0 0 1px !important; }
.tally-app .tally-multiple-choice-option.tally-multiple-choice-option-selected > div,
.tally-app .tally-multiple-choice-option.tally-multiple-choice-option-selected > div:focus-within {
  background: color-mix(in srgb, var(--brand-link) 7%, var(--nl-surface)) !important;
  box-shadow: var(--brand-link) 0 0 0 1px !important;
}
.tally-multiple-choice-option-selected > div > div > div { background-color: var(--brand-link) !important; }
.tally-app .tally-checkbox > div, .tally-app .tally-checkbox:hover > div, .tally-app .tally-checkbox-selected > div { background: transparent !important; box-shadow: none !important; }
.tally-app .tally-checkbox-selected > div > div > div { background-color: var(--nl-text) !important; box-shadow: var(--nl-text) 0 0 0 1px !important; }
.tally-multi-select-selected-option-pill { background: var(--brand-callout-bg) !important; color: var(--brand-callout-text) !important; border: 1px solid var(--brand-callout-border) !important; }

/* ---------- Validation ---------- */
.tally-validation-error { color: var(--nl-error) !important; font-size: 13px; }

/* ---------- Buttons ---------- */
.tally-submit-button { padding-top: var(--nl-form-submit-gap) !important; }
.tally-submit-button button {
  height: var(--nl-field-h); padding: 0 16px;
  background-color: var(--nl-text) !important; color: #fff !important;
  border: 0 !important; border-radius: var(--nl-radius) !important;
  font-size: 15px; font-weight: 600; box-shadow: none !important;
}
.tally-submit-button button:hover { background-color: #000 !important; }
/* Pointer focus can survive a page change; reserve its ring for keyboard navigation. */
.tally-app .tally-submit-button button:focus:not(:focus-visible),
:root[data-nl-pointer-input] .tally-app .tally-submit-button button:focus { outline: none !important; box-shadow: none !important; }
.tally-app .tally-submit-button button:focus-visible { outline: 2px solid var(--brand-focus) !important; outline-offset: 3px; box-shadow: none !important; }
.tally-submit-button button span { color: #fff !important; }
.tally-submit-button svg, .f-btn svg, .btn-primary svg { color: inherit !important; }
.f-btn-2 { color: var(--brand-link) !important; }
.tally-back-button { color: var(--nl-faint); }

/* ---------- Collapsible sections ----------
   nutt-labs-tally.js turns every Heading 2 into a section toggle and marks
   blocks with data-nl-* attributes. Without the script, headings render as
   plain headings and every field stays visible. */
[data-nl-sec] { border-left: 1px solid var(--nl-line); border-right: 1px solid var(--nl-line); padding-left: 20px !important; padding-right: 20px !important; }
[data-nl-sec][data-nl-hide] { display: none !important; }
[data-nl-sec="head"] {
  position: relative; display: flex; align-items: center; min-height: 60px;
  padding-right: 64px !important; border-top: 1px solid var(--nl-line);
  cursor: pointer; user-select: none; transition: background-color .15s;
}
[data-nl-sec="head"][data-nl-first] { border-top-color: var(--nl-line); border-top-left-radius: 12px; border-top-right-radius: 12px; margin-top: 24px !important; }
[data-nl-sec="head"]:hover { background-color: var(--nl-hover); }
[data-nl-sec="head"]:focus { outline: none; }
[data-nl-sec="head"]:focus-visible { box-shadow: none; background-color: var(--nl-hover); }
[data-nl-sec="head"] h2 { margin: 0 !important; padding: 0 !important; font-size: 17px !important; line-height: 24px !important; font-weight: 600 !important; letter-spacing: -.005em; }
[data-nl-sec="head"]::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 28px; height: 28px; margin-top: -14px;
  background: no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23676e78' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5'/%3E%3C/svg%3E");
  transition: transform .2s;
}
[data-nl-sec="head"][aria-expanded="true"]::after { transform: rotate(180deg); }
[data-nl-sec="head"][data-nl-meta]::before {
  content: attr(data-nl-meta); position: absolute; right: 56px; top: 50%; transform: translateY(-50%);
  font-size: 13px; color: var(--nl-faint); white-space: nowrap;
}
[data-nl-sec="body"][data-nl-first-body] { padding-top: 4px !important; }
[data-nl-last] { border-bottom: 1px solid var(--nl-line); border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; padding-bottom: 14px !important; margin-bottom: 24px !important; }
[data-nl-sec="head"][data-nl-last] { padding-bottom: 0 !important; }
[data-nl-sec="head"][aria-expanded="false"][data-nl-last]:hover,
[data-nl-sec="head"][data-nl-last][aria-expanded="false"] { border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }

/* ---------- Multi-page forms ---------- */
/* Progress bar: hairline track, dark fill for completed pages */
.tally-progress-bar-item { background-color: var(--nl-line) !important; height: 3px !important; }
.tally-progress-bar-item::after { background-color: var(--nl-text) !important; }
/* Back link: muted, darkens on hover, tucked into the page's top-left corner (top-right on phones, beside the logo) */
.tally-back-button { position: absolute; top: var(--nl-page-corner); left: var(--nl-page-corner); width: auto !important; z-index: 2; }
.tally-back-button button { color: var(--nl-muted) !important; }
.tally-back-button button:hover { color: var(--nl-text) !important; }
/* A page that opens with a section heading sits close under the Back link */
.tally-page .tally-block-heading-2:not([data-nl-sec]):first-child { padding-top: 8px !important; }

/* ---------- Phone ---------- */
@media (max-width: 576px) {
  .tally-back-button { top: 50px; left: auto; right: 16px; }
  .tally-block-form-title h1 { font-size: 30px; }
  .tally-app div[class*=' tally-block-input'] input,
  .tally-app .tally-block-dropdown input { min-height: 44px; font-size: 16px; }
  .tally-app .tally-block-textarea textarea { font-size: 16px; }
  .tally-submit-button button { height: 44px; width: 100%; }
  [data-nl-sec] { padding-left: 16px !important; padding-right: 16px !important; }
  [data-nl-sec="head"] { min-height: 56px; padding-right: 56px !important; }
  [data-nl-sec="head"]::after { right: 10px; }
  [data-nl-sec="head"][data-nl-meta]::before { right: 46px; }
}

/* Global logo layout: align with Tally's native content-width container.
   Keep the native responsive max-width instead of narrowing its container
   to the image width. Equal padding above and below every brand logo. */
.tally-form-logo { width: 100% !important; height: auto !important; text-align: left !important; padding-block: var(--nl-form-logo-gap) !important; }
.tally-form-logo img { content: var(--brand-logo); display: block !important; width: var(--brand-logo-width) !important; max-width: 100% !important; height: auto !important; max-height: 64px; object-fit: contain !important; object-position: left center; margin: 0 !important; }
.tally-app:has(.tally-form-logo) .tally-page { margin-top: 0 !important; }
@media (max-width: 576px) {
  .tally-app:has(.tally-back-button) .tally-form-logo img { max-width: calc(100% - 80px) !important; }
}

/* GROW overrides. Shared components above remain the defaults for other forms. */
.tally-app[data-pb-ready] { --nl-form-hint-field-gap: 16px; --nl-form-textarea-tall: 160px; }
/* Field rhythm and neutral validation badge. */
.tally-app[data-pb-ready] .tally-block-title[data-pb-field] { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 !important; margin-top: 40px !important; margin-bottom: 0 !important; }
.tally-app[data-pb-ready] .tally-block-title[data-pb-field] > div { min-width: 0; flex: 1; }
.tally-app[data-pb-ready] .tally-block-title h3 { margin: 0 !important; padding: 0 !important; }
.tally-app[data-pb-ready] .tally-block-heading-2 + .tally-block-title[data-pb-field] { margin-top: 24px !important; }
.tally-app[data-pb-ready] .tally-block-title + .tally-block-text { margin-top: 6px !important; margin-bottom: var(--nl-form-hint-field-gap) !important; padding: 0 !important; }
.tally-app[data-pb-ready] .tally-block-text[data-pb-field-part] > .tally-text { padding: 0 !important; }
.tally-app[data-pb-ready] .tally-block-text[data-pb-field-part] + .tally-block[data-pb-field-part] { padding-top: 0 !important; }
.tally-app[data-pb-ready] .tally-block[data-pb-last] { padding-bottom: 0 !important; }
.tally-app[data-pb-ready] .tally-required-indicator::after { color: #6B7280; background: #F3F4F6; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; }
.tally-app[data-pb-ready] .tally-block-textarea textarea { height: var(--nl-form-textarea-tall); min-height: var(--nl-form-textarea-tall); max-height: 400px; overflow-y: auto; resize: vertical; }
.tally-app[data-pb-ready] .tally-block input:not([type="checkbox"]):not([type="radio"]):focus, .tally-app[data-pb-ready] .tally-block textarea:focus { border-color: var(--brand-link) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-link) 10%, transparent) !important; }

/* Example triggers and independent popovers. No field height changes on open. */
.pb-example-trigger { display: inline-flex; align-items: center; flex: none; gap: 4px; border: 0; padding: 4px 8px; border-radius: 6px; background: transparent; color: var(--brand-link); font: inherit; font-size: 13px; font-weight: 500; line-height: 18px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.pb-example-trigger:hover, .pb-example-trigger:focus { background: var(--brand-callout-bg); color: var(--brand-link); }
.pb-example-trigger:focus-visible { outline: 2px solid var(--brand-callout-border); outline-offset: 2px; }
.pb-example-trigger svg { width: 14px; height: 14px; flex: none; }
.pb-popover { position: fixed; z-index: 1000; box-sizing: border-box; width: 420px; max-width: calc(100vw - 32px); overflow: auto; overscroll-behavior: contain; background: #fff; border: 1px solid #E5E7EB; border-radius: 10px; padding: 14px 16px; box-shadow: 0 8px 24px rgb(0 0 0 / .08); color: #374151; font: 400 14px/1.5 var(--nl-font); }
.pb-popover[hidden] { display: none; }
.pb-popover-heading { margin-bottom: 8px; color: #9CA3AF; font-size: 11px; font-weight: 600; letter-spacing: .06em; }
.pb-popover-copy { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Shared form header: outer actions bracket a native-width navigation column. */
.nl-form-header { --nl-form-header-control-height: 40px; box-sizing: border-box; display: grid; grid-template-columns: minmax(0,1fr) var(--nl-form-content-width,640px) minmax(0,1fr); align-items: center; gap: 16px 24px; width: 100%; padding: 32px 24px 24px; font: 400 13px/1.4 var(--nl-font); }
.nl-form-brand { grid-column: 1; display: inline-flex; align-items: center; justify-self: start; min-width: 0; border: 0; text-decoration: none; }
.nl-form-brand .brand-logo { width: auto; max-width: 220px; height: 26px; opacity: 1; }
.nl-form-navigation { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; width: 100%; }
.nl-form-back { display: inline-flex; align-items: center; gap: 6px; min-height: var(--nl-form-header-control-height); padding: 0; border: 0; background: none; color: var(--nl-muted); font: inherit; cursor: pointer; }
.nl-form-back:hover { color: var(--nl-text); }
.nl-form-back[hidden] { display: block; visibility: hidden; pointer-events: none; }
.nl-form-navigation[hidden], .nl-form-page[hidden] { display: none; }
.nl-form-page { display: inline-flex; align-items: center; min-height: var(--nl-form-header-control-height); margin-left: auto; color: var(--nl-faint); white-space: pre-wrap; text-align: right; }
.nl-form-page strong { font-weight: 700; }
.nl-form-subscribe { grid-column: 3; display: inline-flex; justify-self: end; align-items: center; gap: 6px; min-height: var(--nl-form-header-control-height); box-sizing: border-box; padding: 8px 16px; border: 1px solid var(--nl-text); border-radius: var(--nl-radius); background: var(--nl-text); color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color 180ms ease, color 180ms ease; }
.nl-form-subscribe:hover { background: #000; color: #fff; }
.nl-form-header :is(a,button):focus-visible { outline: 2px solid var(--brand-link); outline-offset: 4px; }
.nl-form-header[data-stacked] { grid-template-columns: minmax(0,1fr) auto; }
.nl-form-header[data-stacked] .nl-form-brand { grid-column: 1; grid-row: 1; }
.nl-form-header[data-stacked] .nl-form-subscribe { grid-column: 2; grid-row: 1; }
.nl-form-header[data-stacked] .nl-form-navigation { grid-column: 1 / -1; grid-row: 2; width: min(100%,var(--nl-form-content-width,640px)); justify-self: center; }
.tally-app[data-nl-chrome] { padding-top: 32px; }
.tally-app[data-nl-chrome][data-nl-secondary="true"] { padding-top: 8px; }
.tally-app[data-nl-chrome] :is(.tally-form-logo,.tally-back-button) { display: none !important; }
.tally-app[data-nl-chrome] .tally-page { margin-top: 0 !important; }
.tally-app[data-nl-chrome] .tally-progress-bar-item { position: relative; overflow: hidden; background: var(--nl-line) !important; }
.tally-app[data-nl-chrome] .tally-progress-bar-item::after { content: ''; position: absolute; inset: 0; width: 100% !important; background: var(--nl-text) !important; transform: scaleX(0); transform-origin: left; transition: transform 200ms ease; }
.tally-app[data-nl-chrome] [data-nl-progress="complete"]::after, .tally-app[data-nl-chrome] [data-nl-progress="current"]::after { transform: scaleX(1); }
.tally-app[data-nl-chrome] [data-nl-progress="current"]::after { background: var(--brand-link) !important; }
@media (max-width: 479px) {
 .nl-form-header { --nl-form-header-control-height: 36px; padding: 24px; column-gap: 16px; }
 .nl-form-brand .brand-logo { height: 22px; max-width: 100%; }
 .nl-form-subscribe { padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) {
 .nl-form-subscribe, .tally-app[data-nl-chrome] .tally-progress-bar-item::after { transition: none; }
}

/* GROW results share the form's header, brand tokens and content rhythm. */
.prompt-result { margin: 0; background: var(--nl-surface); font: 400 15px/1.5 var(--nl-font); -webkit-font-smoothing: antialiased; }
.prompt-result * { box-sizing: border-box; }
.prompt-result .nl-form-header { padding-top: 16px; }
.prompt-result .solo-main { max-width: 688px; margin: 0 auto; padding: 32px 24px 64px; }
.prompt-result .guide-head { margin-bottom: 32px; }
.prompt-result h1 { margin: 0; font-size: 40px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
.prompt-result .guide-sub { margin: 16px 0 0; font-size: 17px; line-height: 1.55; color: var(--nl-muted); }
.prompt-result .f-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 0; border-radius: var(--nl-radius); background: var(--nl-text); color: #fff; font: 600 15px/1.4 var(--nl-font); text-decoration: none; cursor: pointer; transition: background-color 180ms ease, color 180ms ease; }
.prompt-result .f-btn svg { flex: none; }
.prompt-result .f-btn:hover { background: #000; }
.prompt-result :focus-visible { outline: 2px solid var(--brand-focus); outline-offset: 3px; }
.pr-cta { padding: 16px 20px; margin: 0 0 40px; border-radius: var(--nl-radius); background: var(--brand-callout-bg); color: var(--brand-callout-text); }
.pr-cta h2 { margin: 0 0 6px; font-size: 15px; font-weight: 600; line-height: 1.4; }
.pr-cta p { margin: 0; color: var(--brand-callout-text); font-size: 14px; line-height: 1.5; }
.pr-join { color: inherit; font-weight: 500; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
.pr-join:hover { text-decoration-color: currentColor; }
.pr-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 24px; color: var(--nl-muted); font-size: 14px; }
.pr-note svg { flex: none; margin-top: 2px; }
.pr-card { border: 1px solid var(--nl-border); border-radius: var(--nl-radius); overflow: hidden; background: var(--nl-surface); }
.pr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--nl-line); }
.pr-body { margin: 0; padding: 20px; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 13px/1.7 var(--nl-mono); color: var(--nl-text); }
.pr-h { font-weight: 700; }
.pr-k { color: var(--nl-muted); }
.prompt-result .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 479px) {
 .prompt-result h1 { font-size: 30px; }
 .prompt-result .f-btn { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) { .prompt-result .f-btn { transition: none; } }

/* Result editing and expiry share the existing prompt-card controls. */
.pr-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.pr-edit { flex-shrink:0; color:var(--nl-text); font-size:12px; text-decoration:underline; text-underline-offset:3px; }
.pr-expiry { margin:0; color:var(--nl-muted); font-size:12px; }
@media(max-width:479px){.pr-head{display:grid;grid-template-columns:1fr auto;gap:8px 12px}.pr-actions{display:contents}.pr-copy{grid-area:1/1;justify-self:start}.pr-edit{grid-area:1/2;align-self:center}.pr-expiry{grid-area:2/1/3/3}}
