/* Giftwise date pages — the calendars and calculators (easter-dates, days-until-my-birthday, …).
   Written by hand: tools/landings.py owns style.css and pages/index.html, not this file.
   The palette is Giftwise's own (landings.py, SPECS["giftwise"]["palette"]). */
:root {
  --bg: #fcf6f3; --paper: #ffffff; --fg: #2a1c1c; --muted: #735f5c;
  --line: #efe1dc; --accent: #d4485f; --ink: #b1364c; --chip: #fbe4e8;
  --on-accent: #ffffff;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
.wrap { max-width: 48rem; margin: 0 auto; padding: 0 16px; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.bar a { color: var(--muted); text-decoration: none; }
.bar a:hover { color: var(--fg); }
.bar .id { display: flex; align-items: center; gap: 10px; color: var(--fg); }
.bar .id img { width: 26px; height: 26px; border-radius: 7px; display: block; }

.hero { padding: clamp(24px, 7vw, 52px) 0 12px; }
h1 { font-size: clamp(1.9rem, 6vw, 2.7rem); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 14px; font-weight: 700; }
h2 { font-size: clamp(1.3rem, 4vw, 1.6rem); letter-spacing: -0.02em; margin: 2em 0 0.5em; }
.sub { font-size: clamp(1.03rem, 3.2vw, 1.18rem); color: var(--muted); margin: 0 0 20px; max-width: 36rem; }
section { margin: 2.2em 0; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
li { margin: 0.4em 0; }

/* The answer up front */
.answer { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 14px; padding: 12px 16px; margin: 0 0 8px; }
.answer p { margin: 0.35em 0; }
.answer time { font-weight: 650; white-space: nowrap; }

/* Tables */
.tablewrap { overflow-x: auto; margin: 0.6em 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.94rem; background: var(--paper); border-radius: 14px; overflow: hidden; }
table.data caption { text-align: left; color: var(--muted); font-size: 0.88rem; padding: 0 0 6px; }
table.data th, table.data td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
table.data td.n { white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data td.wrap-ok { color: var(--muted); font-size: 0.86rem; }
table.data tbody th { font-size: 0.94rem; text-transform: none; letter-spacing: 0; color: var(--fg); font-weight: 650; font-variant-numeric: tabular-nums; }
table.data th small, table.data td small { display: block; font-size: 0.78rem; font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; white-space: normal; }
table.data td.n time { white-space: nowrap; }
table.names td:first-child { font-variant-numeric: tabular-nums; width: 9em; }
table.names tr:target td { background: var(--chip); }
table.data.grid th, table.data.grid td { padding: 7px 4px; text-align: center; font-variant-numeric: tabular-nums; }
table.data.grid th:first-child { text-align: left; padding-left: 10px; white-space: nowrap; }
table.data.grid td { font-size: 0.9rem; }
td[data-gap] { white-space: nowrap; }
.nw { white-space: nowrap; }

.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.rules div { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.rules h3 { margin: 0 0 4px; font-size: 1rem; }
.rules p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.more { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; padding: 0; list-style: none; }
.more li { margin: 0; }
.more a { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; text-decoration: none; color: var(--fg); height: 100%; }
.more a b { display: block; color: var(--ink); }
.more a span { color: var(--muted); font-size: 0.9rem; }

/* What Giftwise does with this date — and what it does not */
.app-note { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 18px; }
.app-note img.shot { width: 150px; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.app-note h2 { margin-top: 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-block; background: var(--accent); color: var(--on-accent); font-weight: 650; text-decoration: none; padding: 12px 20px; border-radius: 11px; }
.btn:hover { filter: brightness(1.07); }

/* Calculators */
.calc { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 10px 30px -18px rgba(80, 20, 30, 0.35); }
.calc h2 { margin: 0 0 10px; font-size: 1.15rem; }
.calc .fields { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.calc label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--muted); min-width: 0; }
.calc input, .calc select { font: inherit; font-size: 1rem; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); min-width: 0; max-width: 100%; }
.calc input[type="number"] { width: 7.5em; }
.calc input:focus-visible, .calc select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc h3.more-h { margin: 18px 0 8px; font-size: 1rem; }
.result { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.result .big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 6px; }
.result .big b { font-size: clamp(2.3rem, 11vw, 3.3rem); line-height: 1; color: var(--accent); letter-spacing: -0.03em; }
.result .big span { font-size: 1.05rem; font-weight: 600; }
.result p { margin: 0.35em 0; }
.result .line { color: var(--muted); }
.result .warn { color: var(--ink); font-weight: 600; }
.result table.data { margin-top: 10px; }
.calc > .line { color: var(--muted); margin: 0.5em 0 0; }

.reviewed { color: var(--muted); font-size: 0.85rem; }
footer { border-top: 1px solid var(--line); margin-top: 3em; padding: 20px 0 40px; color: var(--muted); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 14px; }
footer a { color: var(--muted); }

@media (max-width: 560px) {
  .app-note { grid-template-columns: 1fr; }
  .app-note img.shot { width: 60%; max-width: 220px; justify-self: center; }
  table.data th, table.data td { padding: 8px 7px; }
  table.data { font-size: 0.9rem; }
}
@media (max-width: 400px) {
  table.data th, table.data td { padding: 8px 5px; }
  table.data thead th { letter-spacing: 0.02em; }
}
