/* App a Day — public site. Broadsheet design tokens, paper/ink aware.
   ponytail: no preprocessor, no framework — single file the browser parses. */

:root {
  color-scheme: light dark;

  --canvas:       #FAF8F4;
  --surface:      #FFFFFF;
  --surface-high: #F1EDE5;
  --stroke:       #E2DCD0;
  --text:         #1A1917;
  --text-second:  #57534A;
  --text-third:   #6B665A;
  --accent:       #B4341F;
  --warning:      #8A6A18;

  --radius-chip:  8px;
  --radius-card:  12px;
  --radius-hero:  16px;

  --space-xxs: 4px;
  --space-xs:  8px;
  --space-s:   12px;
  --space-m:   16px;
  --space-l:   24px;
  --space-xl:  32px;
  --space-xxl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  --max: 1080px;
  --serif: ui-serif, Georgia, "Iowan Old Style", "Apple Garamond", Times, serif;
  --sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas:       #121110;
    --surface:      #1B1A18;
    --surface-high: #262421;
    --stroke:       #35322D;
    --text:         #F6F3ED;
    --text-second:  #ACA598;
    --text-third:   #8E8878;
    --accent:       #E2664B;
    --warning:      #D2A24E;
  }
}

html[data-theme="light"] {
  --canvas:       #FAF8F4;
  --surface:      #FFFFFF;
  --surface-high: #F1EDE5;
  --stroke:       #E2DCD0;
  --text:         #1A1917;
  --text-second:  #57534A;
  --text-third:   #6B665A;
  --accent:       #B4341F;
  --warning:      #8A6A18;
}

html[data-theme="dark"] {
  --canvas:       #121110;
  --surface:      #1B1A18;
  --surface-high: #262421;
  --stroke:       #35322D;
  --text:         #F6F3ED;
  --text-second:  #ACA598;
  --text-third:   #8E8878;
  --accent:       #E2664B;
  --warning:      #D2A24E;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--canvas);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* --- layout --------------------------------------------------------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--space-m);
}

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

.rule--stroke { border-top-color: var(--stroke); }

/* --- nav ------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--canvas);
  border-bottom: 1px solid var(--stroke);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-s) var(--space-m);
  max-width: var(--max);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent);
  flex: 0 0 auto;
}

.brand__mark::before {
  /* The punch holes need to render at favicon size; the canonical SVG carries
     the real mark. ponytail: skip the second pass at 28px — a flat coloured
     square is enough at this scale. */
  content: "";
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-m);
}

.nav__link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-second);
}

.nav__link:hover { color: var(--text); }

.theme-toggle {
  appearance: none;
  border: 1px solid var(--stroke);
  background: var(--surface);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-chip);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle svg { width: 16px; height: 16px; }

/* --- hero ----------------------------------------------------------- */

.hero {
  padding: var(--space-3xl) 0 var(--space-xxl);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

@media (max-width: 760px) {
  .hero__grid { grid-template-columns: 1fr; }
}

.overline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-third);
  margin: 0 0 var(--space-s);
}

.overline--accent { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
}

h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
}

h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.1;
}

h3 {
  font-size: 20px;
  line-height: 1.25;
}

p.lede {
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
  color: var(--text-second);
  margin: var(--space-m) 0 0;
}

.hero__mascot {
  display: flex;
  justify-content: center;
}

.hero__mascot img {
  width: 100%;
  max-width: 360px;
  height: auto;
}

/* --- buttons -------------------------------------------------------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 14px 22px;
  border-radius: var(--radius-chip);
  font: 600 15px/1 var(--sans);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 120ms ease, transform 120ms ease;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--text);
  color: var(--canvas);
}

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--stroke);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-l);
}

.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.7;
}

/* --- sections ------------------------------------------------------- */

.section {
  padding: var(--space-xxl) 0;
  border-top: 1px solid var(--stroke);
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
  max-width: 720px;
}

.section__title { font-size: clamp(26px, 3vw, 36px); }

.section__lede {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--text-second);
  margin: 0;
}

/* --- how it works (3 steps) ---------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-l);
}

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  padding: var(--space-l);
}

.step__num {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 36px;
  color: var(--accent);
  line-height: 1;
}

.step__title { margin-top: var(--space-s); }

.step__body {
  margin: var(--space-xs) 0 0;
  color: var(--text-second);
}

/* --- sample idea card --------------------------------------------- */

.idea-card {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  padding: var(--space-l);
  max-width: 720px;
}

.idea-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding-bottom: var(--space-s);
  border-bottom: 1px solid var(--stroke);
  margin-bottom: var(--space-m);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-chip);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tag--productivity {
  color: #2C6FA8;
  background: rgba(44, 111, 168, 0.12);
}
.tag--finance {
  color: #1F7A6B;
  background: rgba(31, 122, 107, 0.12);
}
.tag--games {
  color: #A33C6E;
  background: rgba(163, 60, 110, 0.12);
}

.idea-card__date {
  font-size: 13px;
  color: var(--text-third);
}

.idea-card__title {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
}

.idea-card__pitch {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--text-second);
  line-height: 1.5;
  margin: var(--space-s) 0 var(--space-m);
}

.idea-card__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-m);
}

@media (max-width: 540px) {
  .idea-card__grid { grid-template-columns: 1fr; }
}

.idea-card__field dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-third);
  margin-bottom: 4px;
}

.idea-card__field dd {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.45;
}

.idea-card__cta {
  margin-top: var(--space-l);
  padding-top: var(--space-m);
  border-top: 1px solid var(--stroke);
  display: flex;
  justify-content: flex-end;
}

/* --- categories grid ----------------------------------------------- */

.cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-s);
}

.cat {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  padding: var(--space-m);
}

.cat__name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.cat__name--productivity    { color: #2C6FA8; }
.cat__name--health-fitness  { color: #3F8F5B; }
.cat__name--mental-wellness { color: #6C5CA8; }
.cat__name--education       { color: #B5722A; }
.cat__name--finance         { color: #1F7A6B; }
.cat__name--games           { color: #A33C6E; }
.cat__name--social          { color: #C4553B; }
.cat__name--ecommerce       { color: #8A7220; }
.cat__name--saas-b2b        { color: #47607A; }
.cat__name--ai-utilities    { color: #4A4E8C; }

.cat__hint {
  margin: 0;
  font-size: 13px;
  color: var(--text-second);
}

/* --- mascot row ----------------------------------------------------- */

.mascots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-m);
}

@media (max-width: 760px) {
  .mascots { grid-template-columns: repeat(2, 1fr); }
}

.mascot {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  padding: var(--space-m);
  text-align: center;
}

.mascot__img {
  width: 100%;
  max-width: 140px;
  margin: 0 auto var(--space-s);
}

.mascot__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-third);
  margin: 0;
}

/* --- plans ---------------------------------------------------------- */

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-l);
  align-items: stretch;
}

@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
}

.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  padding: var(--space-l);
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}

/* ponytail: only Pro gets the accent border — every other card stays neutral */
.plan--featured { border-color: var(--accent); }

.plan__tag {
  position: absolute;
  top: calc(-1 * var(--space-xs));
  right: var(--space-l);
  background: var(--accent);
  color: var(--canvas);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-chip);
  margin: 0;
}

.plan__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-bottom: var(--space-m);
  border-bottom: 1px solid var(--stroke);
}

.plan__name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: var(--space-xs);
}

.plan__yearly {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-third);
}

.plan__price {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1;
  margin: 0;
}

.plan__price span {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-third);
  margin-left: 4px;
}

.plan__lede {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--text-second);
  line-height: 1.45;
  margin: 0;
}

.plan__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.plan__list li {
  font-size: 14px;
  color: var(--text);
  padding-left: var(--space-m);
  position: relative;
}

/* ponytail: simple unicode tick — the same character the platform serif renders everywhere else */
.plan__list li::before {
  content: "✓";
  color: var(--accent);
  position: absolute;
  left: 0;
  font-weight: 700;
}

/* --- FAQ ------------------------------------------------------------ */

.faq { max-width: 720px; }

.faq details {
  border-top: 1px solid var(--stroke);
  padding: var(--space-m) 0;
}

.faq details:last-of-type { border-bottom: 1px solid var(--stroke); }

.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: var(--sans);
  font-weight: 400;
  font-size: 22px;
  color: var(--text-third);
  transition: transform 150ms ease;
}

.faq details[open] summary::after {
  content: "−";
  color: var(--accent);
}

.faq p {
  margin: var(--space-s) 0 0;
  color: var(--text-second);
}

/* --- footer --------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--stroke);
  padding: var(--space-xl) 0 var(--space-xxl);
  margin-top: var(--space-xxl);
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-third);
}

.foot__links { display: flex; gap: var(--space-m); }
.foot__link  { text-decoration: none; color: var(--text-second); }
.foot__link:hover { color: var(--text); }
.foot__link[aria-current="page"] { color: var(--accent); }

/* --- legal pages (privacy policy) ---------------------------------- */

.legal {
  max-width: 760px;
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

.legal__head { margin-bottom: var(--space-xl); }

.legal__title {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: var(--space-s) 0 var(--space-m);
  color: var(--text);
}

.legal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  font-size: 13px;
  color: var(--text-third);
  margin: 0 0 var(--space-m);
}

.legal__lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-second);
  margin: 0;
  max-width: 60ch;
}

.legal__summary {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-card);
  padding: var(--space-l) var(--space-xl);
  margin: var(--space-xl) 0;
}
.legal__summary .legal__h2 {
  margin-top: 0;
  font-size: 18px;
  border-bottom: 0;
  padding-bottom: 0;
}

.legal__toc {
  background: var(--surface-high);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  padding: var(--space-l) var(--space-xl);
  margin: var(--space-xl) 0 var(--space-2xl);
}
.legal__toc .legal__h2 {
  margin-top: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-third);
  border-bottom: 0;
  padding-bottom: 0;
  font-family: var(--sans);
  font-weight: 600;
}
.legal__toc-list {
  list-style: decimal;
  padding-left: 1.4em;
  margin: var(--space-s) 0 0;
  columns: 2;
  column-gap: var(--space-xl);
  font-size: 15px;
}
.legal__toc-list li { margin: var(--space-xxs) 0; break-inside: avoid; }
.legal__toc-list a { color: var(--text); text-decoration: none; }
.legal__toc-list a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 640px) {
  .legal__toc-list { columns: 1; }
}

.legal__section {
  margin-top: var(--space-2xl);
  scroll-margin-top: var(--space-xl);
}

.legal__h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 var(--space-m);
  padding-bottom: var(--space-s);
  border-bottom: 1px solid var(--stroke);
}

.legal p { margin: 0 0 var(--space-m); }
.legal p:last-child { margin-bottom: 0; }

.legal__bullets {
  list-style: disc;
  padding-left: 1.4em;
  margin: 0 0 var(--space-m);
}
.legal__bullets li { margin: var(--space-xs) 0; }
.legal__bullets li::marker { color: var(--text-third); }
.legal__bullets li > strong:first-child { color: var(--text); }

.legal__columns {
  list-style: disc;
  padding-left: 1.4em;
  margin: 0 0 var(--space-m);
  columns: 2;
  column-gap: var(--space-xl);
}
.legal__columns li { margin: var(--space-xxs) 0; break-inside: avoid; }
.legal__columns li::marker { color: var(--text-third); }

@media (max-width: 640px) {
  .legal__columns { columns: 1; }
}

.legal__address {
  font-style: normal;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  padding: var(--space-m) var(--space-l);
  margin: var(--space-m) 0;
  line-height: 1.7;
}

.legal__table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-m) 0 var(--space-l);
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.legal__table th,
.legal__table td {
  text-align: left;
  padding: var(--space-s) var(--space-m);
  border-bottom: 1px solid var(--stroke);
  vertical-align: top;
}
.legal__table thead th {
  background: var(--surface-high);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-third);
  border-bottom: 1px solid var(--stroke);
}
.legal__table tbody tr:last-child td { border-bottom: 0; }
.legal__table code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface-high);
  border: 1px solid var(--stroke);
  border-radius: 4px;
  padding: 1px 5px;
}

@media (max-width: 640px) {
  .legal__table,
  .legal__table thead,
  .legal__table tbody,
  .legal__table tr,
  .legal__table th,
  .legal__table td { display: block; }
  .legal__table thead { display: none; }
  .legal__table tr {
    border-bottom: 1px solid var(--stroke);
    padding: var(--space-s) 0;
  }
  .legal__table tr:last-child { border-bottom: 0; }
  .legal__table td {
    border-bottom: 0;
    padding: var(--space-xxs) var(--space-m);
  }
  .legal__table td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-third);
    margin-bottom: 2px;
  }
}

.legal a { color: var(--accent); }
