/*
  Painted with Astrario's own palettes, taken from the app rather than picked:
  Sol in light, Júpiter in dark. Both are derived from photometry — a 5772 K
  blackbody with the chromosphere's H-alpha for its accent, ammonia ice with
  the Great Red Spot's chromophore for the other. See scripts/palette in the
  app's repository.
*/
:root {
    --ground: #F4ECE8;
    --raised: #E9E0DC;
    --rule:   #C4BAB4;
    --ink:    #2A2828;
    --ink-dim:#605C5A;
    --accent: #CB003A;
    --body: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
    :root {
        --ground: #141210;
        --raised: #272320;
        --rule:   #4D453F;
        --ink:    #E4DBD4;
        --ink-dim:#908B86;
        --accent: #E9AF00;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0 1.25rem 6rem;
    background: var(--ground);
    color: var(--ink);
    font: 17px/1.7 var(--body);
    -webkit-font-smoothing: antialiased;
}
main { max-width: 40rem; margin: 0 auto; }

/* The masthead carries the app's mark: the bands of Jupiter, which is what
   the default aspect draws while it waits. */
header {
    max-width: 40rem;
    margin: 0 auto;
    padding: 3.5rem 0 2.5rem;
}
.mark {
    display: block;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.5rem;
}
.eyebrow {
    font: 600 .72rem/1 var(--mono);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 .9rem;
}
h1 {
    font-size: 2.1rem;
    line-height: 1.15;
    letter-spacing: -.015em;
    margin: 0 0 .6rem;
    font-weight: 600;
}
.sub {
    font: .82rem/1.5 var(--mono);
    color: var(--ink-dim);
    margin: 0;
}
.sub a { color: var(--ink-dim); }

h2 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .005em;
    margin: 3rem 0 .7rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--rule);
}
p { margin: 0 0 1rem; }
ul { padding-left: 1.1rem; margin: 0 0 1rem; }
li { margin: .45rem 0; }
a { color: var(--accent); text-underline-offset: .18em; }
strong { font-weight: 600; }
code {
    font: .88em/1 var(--mono);
    background: var(--raised);
    padding: .15em .4em;
    border-radius: 3px;
}

/* The one claim the whole page rests on, given the room to be read. */
.note {
    background: var(--raised);
    border-left: 2px solid var(--accent);
    padding: 1rem 1.2rem;
    margin: 1.75rem 0;
    color: var(--ink);
    font-size: .95rem;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.25rem 0 1.5rem;
    font-size: .93rem;
}
th, td {
    text-align: left;
    padding: .7rem .8rem .7rem 0;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
}
th {
    font: 600 .68rem/1.4 var(--mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-dim);
    border-bottom-color: var(--ink-dim);
    padding-bottom: .5rem;
}
td:last-child, th:last-child { padding-right: 0; }

/* Below this width three columns stop being a table and start being a
   crossword. Each row becomes its own small block instead. */
@media (max-width: 34rem) {
    table, tbody, tr, td, th { display: block; width: 100%; }
    thead { display: none; }
    tr { border-bottom: 1px solid var(--rule); padding: .9rem 0; }
    td { border: 0; padding: .1rem 0; }
    td:first-child { font-weight: 600; }
    td:not(:first-child) { color: var(--ink-dim); font-size: .9rem; }
    td:not(:first-child)::before { content: "→ "; }
}

footer {
    max-width: 40rem;
    margin: 4.5rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
    color: var(--ink-dim);
    font: .82rem/1.7 var(--mono);
}
footer a { color: var(--ink-dim); }
