/* NatalDay's one stylesheet, linked by every page. System fonts only: privacy.html
   lists the processors, so this file must never request anything from another origin. */

:root {
  color-scheme: light;
  --ink: #23213a;
  --ink-soft: #55516e;
  --paper: #f7f4ee;
  --card: #fffdf9;
  --line: #ddd6c8;
  --night: #1c1b3a;
  --night-soft: #d9d6ec;
  --star: #f1d9a0;
  --accent: #4b3d94;
  --accent-dark: #372c73;
  --accent-tint: #efebf8;
  --danger: #8f2d2d;
  --disabled-bg: #e6e2ee;
  --disabled-ink: #4f4b66;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Side padding that keeps full-width bands lined up with the centred column. */
  --gutter: max(1.25rem, calc((100% - 41.5rem) / 2));
}

/* An author display rule would otherwise beat the attribute the page's script toggles. */
[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.2; }
h2 { margin: 0 0 .75rem; font-size: 1.5rem; color: var(--night); }

a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-dark); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.muted { color: var(--ink-soft); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.small { font-size: .9375rem; }

/* The night band at the top of every page. The stars are CSS, so no image request. */
header {
  padding: 2.25rem var(--gutter) 2rem;
  background-color: var(--night);
  background-image:
    radial-gradient(1.5px 1.5px at 88% 22%, var(--star), transparent),
    radial-gradient(1px 1px at 72% 62%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 94% 74%, #fff, transparent),
    radial-gradient(1px 1px at 80% 12%, #fff, transparent),
    radial-gradient(2px 2px at 64% 28%, var(--star), transparent);
  color: #fff;
}
header h1 { margin: 0 0 .4rem; font-size: clamp(2rem, 7vw, 2.75rem); letter-spacing: .01em; }
header p { margin: 0; }
header .muted { color: var(--night-soft); }
header a { color: var(--star); font-family: var(--serif); font-size: 1.125rem; }
header a:hover { color: #fff; }
header p:has(> a) { margin-bottom: .75rem; }
/* The price, the ad's headline, in the star colour so it reads as its own line. */
header .price { margin-top: .5rem; color: var(--star); font-weight: 600; line-height: 1.4; }
header :focus-visible { outline-color: var(--star); }

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 0;
}

/* The app page reads as a stack of cards. The legal pages stay plain running text. */
main > section {
  margin-bottom: 1.25rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
main > section > :last-child { margin-bottom: 0; }
main > h2 { margin-top: 2rem; }

/* Today's sky */
#moon-sign { margin: 0; font-family: var(--serif); font-size: 1.25rem; }
#retrogrades { margin: .25rem 0 1rem; color: var(--ink-soft); }
#sky-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
#sky-list li { padding: .4rem 0; border-top: 1px solid var(--line); }
#sky-more summary { padding: .25rem 0; color: var(--accent); cursor: pointer; }
#sky-more[open] summary { margin-bottom: .5rem; }

/* Forms stack on a phone, and take a label column once there is room. */
form { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem 1rem; }
form > *, #manual > div > * { min-width: 0; }
form p { margin: 0; }
label { font-weight: 500; }
form .wide, form .actions { grid-column: 1 / -1; }

input:not([type="checkbox"]), textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: .5rem .7rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid #8a8598;
  border-radius: 8px;
  font: inherit;
}
input::placeholder { color: var(--ink-soft); opacity: 1; }
input:disabled { background: var(--disabled-bg); color: var(--disabled-ink); }
input[type="checkbox"] {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: .2rem 0 0;
  accent-color: var(--accent);
}
label:has(> input[type="checkbox"]) { display: flex; gap: .6rem; align-items: flex-start; }

@media (min-width: 40rem) {
  #birth-form, #signin-form, #manual > div {
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
  }
}

.place-box { position: relative; }
#place-list {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  margin: .25rem 0 0;
  padding: .25rem;
  max-height: 16rem;
  overflow-y: auto;
  list-style: none;
  background: #fff;
  border: 1px solid #8a8598;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(28, 27, 58, .18);
}
#place-list li { padding: .45rem .6rem; border-radius: 6px; cursor: pointer; }
#place-list li:hover, #place-list li[aria-selected="true"] { background: var(--accent-tint); }

/* While the place list loads: a line under the box with a small turning ring. */
.place-status { display: flex; align-items: center; gap: .5rem; color: var(--accent-dark); font-weight: 500; }
.place-status::before {
  content: "";
  flex: none;
  width: .9rem;
  height: .9rem;
  border: 2px solid var(--accent-tint);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: turn .8s linear infinite;
}
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .place-status::before { animation: none; border-color: var(--accent); }
}

#manual summary { padding: .25rem 0; color: var(--accent); cursor: pointer; }
#manual > div { display: grid; gap: .5rem 1rem; margin-top: .5rem; }

/* Off screen, for the bots this field exists to catch. */
.trap { position: absolute; left: -9999px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .5rem; }

button {
  min-height: 2.75rem;
  padding: .55rem 1.1rem;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
button.quiet { background: transparent; color: var(--accent); }
button.quiet:hover { background: var(--accent-tint); color: var(--accent-dark); }
button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
button.danger:hover { background: #f8e9e6; color: var(--danger); }
button:disabled, button:disabled:hover {
  background: var(--disabled-bg);
  color: var(--disabled-ink);
  border-color: var(--line);
  cursor: not-allowed;
}

/* The personal line, in the preview and at the top of a reading. */
.headline {
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  background: var(--accent-tint);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--night);
}

/* Paywall. The renewal terms have a legal job: they are never smaller or fainter
   than body text, and they sit in plain view above the plan buttons. */
.terms {
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 8px;
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.6;
}
#paywall label { font-weight: 600; }
#paywall .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#paywall .actions button { min-height: 3.25rem; font-size: 1.125rem; }
#paywall-past-due .actions { grid-template-columns: 1fr; }

/* The chart: the big three, then the wheel. Shown in the preview and the reading.
   On a phone the big three are short rows, so a long sign like Sagittarius fits. */
.big3 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .4rem;
  margin: 0 0 1rem;
}
.big3-card {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .45rem .75rem;
  background: var(--accent-tint);
  border-left: 3px solid var(--el, var(--accent));
  border-radius: 0 8px 8px 0;
  line-height: 1.3;
}
.big3-card.fire { --el: #b4441f; }
.big3-card.earth { --el: #2f7d4a; }
.big3-card.air { --el: #8a6400; }
.big3-card.water { --el: #0e6f8a; }
.big3-label { flex: none; width: 3.5rem; }
.big3-degree { margin-left: auto; }
@media (min-width: 40rem) {
  .big3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
  .big3-card { flex-direction: column; gap: 0; padding: .6rem .8rem; border-left: 0; border-top: 3px solid var(--el, var(--accent)); border-radius: 8px; }
  .big3-label { width: auto; }
  .big3-degree { margin-left: 0; }
}
.big3-label { color: var(--ink-soft); font-size: .9375rem; font-weight: 600; }
.big3-sign { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--night); white-space: nowrap; }
.big3-glyph { color: var(--el); font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "DejaVu Sans", var(--sans); }
.big3-degree { color: var(--ink-soft); font-size: .9375rem; }

.wheel-box { margin: 0 0 1rem; }
.wheel {
  display: block;
  width: 100%;
  max-width: 28rem;
  height: auto;
  margin: 0 auto;
  font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "DejaVu Sans", var(--sans);
}

/* The preview's today block and the locked titles under it. */
.today { margin: 0 0 .5rem; font-family: var(--serif); font-size: 1.125rem; color: var(--night); }
.locked { margin: 0 0 1rem; padding: 0; list-style: none; }
.locked li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 0;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-weight: 600;
  color: var(--night);
}
/* A padlock drawn in CSS: the body, and the shackle as a rounded border above it. */
.lock {
  position: relative;
  flex: none;
  width: .8rem;
  height: .65rem;
  margin-top: .35rem;
  background: var(--accent);
  border-radius: 2px;
}
.lock::before {
  content: "";
  position: absolute;
  left: .14rem;
  bottom: 100%;
  width: .52rem;
  height: .4rem;
  border: 2px solid var(--accent);
  border-bottom: 0;
  border-radius: .3rem .3rem 0 0;
}

/* The reading: a night band with today's line, the week strip, then the rows.
   The band runs to the card's edges, so the card's padding is a variable here. */
#reading-section { --pad-x: 1.5rem; padding-top: 0; overflow: hidden; }
.hero {
  margin: 0 calc(-1 * var(--pad-x)) 1.25rem;
  padding: 1.25rem var(--pad-x) 1.4rem;
  background-color: var(--night);
  background-image:
    radial-gradient(1.5px 1.5px at 90% 18%, var(--star), transparent),
    radial-gradient(1px 1px at 76% 40%, #fff, transparent),
    radial-gradient(1px 1px at 96% 62%, #fff, transparent),
    radial-gradient(2px 2px at 84% 8%, var(--star), transparent);
  color: #fff;
}
.hero p { margin: 0; }
.hero-date { color: var(--star); font-size: .9375rem; font-weight: 600; letter-spacing: .02em; }
.hero-label { margin-left: .4rem; padding-left: .55rem; border-left: 1px solid var(--night-soft); color: var(--night-soft); font-weight: 400; letter-spacing: 0; }
.hero .hero-line {
  margin: .35rem 0 .6rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 6.5vw, 2.1rem);
  font-weight: 700;
  line-height: 1.15;
}
.hero-text { color: #f4f2fb; font-size: 1.0625rem; line-height: 1.55; }

/* The week strip: seven columns, yesterday to five days on, today marked. */
.strip { margin: 0 0 1.25rem; }
.strip-title, .week-title { margin: 0 0 .5rem; font-family: var(--serif); font-size: 1.125rem; color: var(--night); }
.strip-days, .strip-bar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.strip-days { margin-bottom: .25rem; }
.strip-day { color: var(--ink-soft); font-size: .8125rem; text-align: center; }
.strip-day.now { color: var(--accent-dark); font-weight: 700; }
.strip-rows { margin: 0; padding: 0; list-style: none; }
.strip-row { padding: .4rem 0; border-top: 1px solid var(--line); }
.strip-label { margin-bottom: .3rem; line-height: 1.3; }
.strip-name { display: block; font-family: var(--serif); font-weight: 600; color: var(--night); }
.strip-tags { display: flex; flex-wrap: wrap; gap: 0 .75rem; }
.strip-tag { color: var(--ink-soft); font-size: .875rem; white-space: nowrap; }
.strip-tag.new { color: var(--accent-dark); font-weight: 700; }
.strip-bar { height: .75rem; }
.cell { position: relative; }
.cell.on { background: var(--accent); }
.cell.on.start { border-radius: 6px 0 0 6px; }
.cell.on.end { border-radius: 0 6px 6px 0; }
.cell.on.start.end { border-radius: 6px; }
.cell:not(.on) { margin: .3rem 0; background: var(--line); }
/* Today's marker: a line down the today column of every bar. */
.cell.now::after {
  content: "";
  position: absolute;
  top: -.3rem;
  bottom: -.3rem;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: var(--star);
  box-shadow: 0 0 0 1px var(--night);
}
.cell.now:not(.on)::after { top: -.6rem; bottom: -.6rem; }

/* This week, this season and the rest. */
.week { margin: 0 0 1rem; padding: 0; list-style: none; }
.week li { padding: .8rem 0; border-top: 1px solid var(--line); }
.week strong { font-family: var(--serif); font-size: 1.125rem; color: var(--night); }
.week p { margin: .3rem 0 0; }
#reading-section details { margin: 0 0 1rem; border-top: 1px solid var(--line); }
#reading-section summary { padding: .7rem 0 .2rem; color: var(--accent); cursor: pointer; }
details.season summary { font-family: var(--serif); font-size: 1.0625rem; font-weight: 600; }
.fold { margin: .25rem 0 0; padding: 0; list-style: none; }
.fold li { padding: .6rem 0; }
.fold strong { font-family: var(--serif); color: var(--night); }
.fold p { margin: .2rem 0 0; }
#reading-chart { margin-top: .75rem; }

footer {
  margin-top: 2rem;
  padding: 1.25rem var(--gutter) 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .9375rem;
}
footer a { display: inline-block; margin-right: .75rem; padding: .2rem 0; }

/* On a phone, give the text the width: the contact address fits the terms box on one line. */
@media (max-width: 30rem) {
  header { padding: 1.5rem var(--gutter) 1.25rem; }
  main { padding-top: 1rem; }
  main > section { padding: 1.25rem 1.1rem; }
  #reading-section { --pad-x: 1.1rem; padding-top: 0; }
  .terms { padding: .85rem; }
}
