/* Shared by the Unsnoozy pages. The colours are the app's "Sunrise" tokens
   (ios/Unsnoozy/Design/Tokens.swift); the header band is the icon's gradient. */
:root {
  --ground: #fbf7f0; --surface: #fffdf8; --tile: #fff0c2;
  --fg: #29242b; --secondary: #675e58; --muted: #776d66;
  --accent: #e5573f; --emphasis: #c4432e; --border: #e3d9cc;
  --sun-top: #ff4e6a; --sun-foot: #ffa64d; --on-sun: #ffffff;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1d1b24; --surface: #27242f; --tile: #3d3424;
    --fg: #efebe6; --secondary: #a39ca6; --muted: #958e98;
    --accent: #ff8c73; --emphasis: #ffd36b; --border: #423e48;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--fg);
       font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
       -webkit-text-size-adjust: 100%; }
a { color: var(--emphasis); text-underline-offset: .15em; }
strong { font-weight: 650; }

/* Header: the sunrise, with the mark and the two pages. */
.masthead { background: linear-gradient(160deg, var(--sun-top), var(--sun-foot));
            color: var(--on-sun); padding: 1rem 16px 4.5rem; }
.masthead .bar { max-width: 44rem; margin: 0 auto; display: flex;
                 align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; color: inherit;
         text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.brand img { width: 36px; height: 36px; border-radius: 22.5%;
             box-shadow: 0 2px 8px rgba(138, 36, 54, .3); }
nav { display: flex; gap: .35rem; }
nav a { color: var(--on-sun); text-decoration: none; font-size: .9rem; font-weight: 600;
        padding: .3rem .8rem; border-radius: 99px; background: rgba(255, 255, 255, .16); }
nav a:hover { background: rgba(255, 255, 255, .28); }
nav a[aria-current="page"] { background: var(--on-sun); color: var(--emphasis); }
@media (prefers-color-scheme: dark) { nav a[aria-current="page"] { color: #c4432e; } }

.hero { max-width: 44rem; margin: 2.25rem auto 0; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 2.5rem); line-height: 1.15; margin: 0;
           letter-spacing: -.02em; }
.hero .updated { margin: .4rem 0 0; opacity: .88; font-size: .95rem; }

/* Body: cards that rise over the foot of the header. */
main { max-width: calc(44rem + 32px); margin: -3rem auto 0; padding: 0 16px 3rem; }
.card { background: var(--surface); border: 1px solid var(--border);
        border-radius: 14px; padding: 1.35rem 1.4rem; margin: 0 0 1rem; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.lede { font-size: 1.05rem; }
.lede p:first-child { margin-top: 0; }
.summary { background: var(--tile); border-color: transparent; }
.summary .label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .08em;
                  text-transform: uppercase; color: var(--emphasis); margin-bottom: .3rem; }

h2 { font-size: 1.12rem; line-height: 1.3; margin: 0 0 .6rem;
     display: flex; align-items: center; gap: .55rem; }
h2::before { content: ""; flex: none; width: .5rem; height: .5rem; border-radius: 50%;
             background: linear-gradient(160deg, var(--sun-top), var(--sun-foot)); }
section { scroll-margin-top: 1rem; }
p { margin: .6rem 0; }
ul, ol { padding-left: 1.2rem; margin: .6rem 0; }
li { margin: .35rem 0; }
li::marker { color: var(--accent); }

/* Contact: the address as a button once the script has assembled it. */
.contact .address a { display: inline-block; margin-top: .15rem; padding: .55rem 1.1rem;
                      border-radius: 99px; background: var(--accent); color: #fff;
                      font-weight: 650; text-decoration: none; }
@media (prefers-color-scheme: dark) { .contact .address a { color: #1d1b24; } }
.contact .hint { color: var(--secondary); font-size: .95rem; }

/* Jump links to the questions. */
.toc { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.toc li { margin: 0; }
.toc a { display: block; padding: .35rem .8rem; border-radius: 99px; font-size: .9rem;
         text-decoration: none; color: var(--fg); background: var(--surface);
         border: 1px solid var(--border); }
.toc a:hover { border-color: var(--accent); }

footer { max-width: calc(44rem + 32px); margin: 0 auto; padding: .5rem calc(16px + 1.4rem) 3rem; color: var(--muted);
         font-size: .9rem; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
footer a { color: inherit; }
