/* Colorbreak's dark shell, straight off scripts/palette.gd — the page is the
   board's night theme, not a second design. The only saturated colour here
   belongs to the game pieces and the one action button, same rule as the app. */

:root {
    --bg: #0f1216;
    --surface: #171b21;
    --surface-2: #1e232b;
    --slot: #232935;
    --ink: #f2f4f7;
    --ink-muted: rgba(242, 244, 247, 0.66);
    --ink-faint: rgba(242, 244, 247, 0.42);
    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(255, 255, 255, 0.15);
    --cta: #2c93f5;
    --cta-hover: #57a9f7;
    --cta-ink: #ffffff;

    /* The pieces. Fixed in both themes, so they are the one thing on this
       page that would not move if it were the light shell. */
    --red: #f03a42;
    --yellow: #f6c22c;
    --green: #35b859;
    --blue: #2c93f5;
    --violet: #9b4de0;
    --orange: #f0832a;
    --teal: #17b3ae;
    --pink: #ee5fa7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Manrope", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--cta);
    text-decoration: none;
    border-bottom: 1px solid var(--line-strong);
    word-break: break-word;
}

a:hover {
    color: var(--cta-hover);
    border-bottom-color: var(--cta);
}

/* --- the page ------------------------------------------------------------ */

.legal {
    max-width: 720px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem 5rem;
}

.legal__header {
    padding-bottom: 2.2rem;
    margin-bottom: 2.4rem;
    border-bottom: 1px solid var(--line);
}

.legal__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.legal__brand svg {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.legal__eyebrow {
    margin: 0;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.legal__title {
    margin: 0 0 0.7rem;
    font-weight: 800;
    font-size: clamp(1.9rem, 6vw, 2.75rem);
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.legal__meta {
    margin: 0;
    color: var(--ink-faint);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.82rem;
}

/* The six-piece row under the title: the icon's board, laid flat. */
.legal__pieces {
    display: flex;
    gap: 8px;
    margin-top: 1.6rem;
}

.legal__pieces span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

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

.legal__section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 1.7rem 1.8rem;
    margin-bottom: 1rem;
}

.legal__section-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.8rem;
}

/* One piece per section, in palette order — the same six colours the board
   deals from, used here only as a marker. */
.legal__dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legal__section h2 {
    margin: 0;
    font-weight: 700;
    font-size: clamp(1.05rem, 2.6vw, 1.22rem);
    letter-spacing: -0.015em;
}

.legal__section p {
    margin: 0 0 0.9rem;
    color: var(--ink-muted);
    font-weight: 400;
    font-size: clamp(0.9rem, 2vw, 0.98rem);
    line-height: 1.75;
}

.legal__section p:last-child {
    margin-bottom: 0;
}

.legal__section strong {
    color: var(--ink);
    font-weight: 700;
}

/* What the save file holds, itemised — the whole of it fits in a list. */
.legal__list {
    margin: 0 0 0.9rem;
    padding: 0;
    list-style: none;
}

.legal__list li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: 0.45rem;
    color: var(--ink-muted);
    font-size: clamp(0.9rem, 2vw, 0.98rem);
    line-height: 1.7;
}

.legal__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ink-faint);
}

.legal__list li:last-child {
    margin-bottom: 0;
}

/* The one line on the page that is a claim about the build, not about us. */
.legal__note {
    margin-top: 1.1rem;
    padding: 0.95rem 1.1rem;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: var(--surface-2);
    color: var(--ink-muted);
    font-size: clamp(0.85rem, 2vw, 0.93rem);
    line-height: 1.7;
}

/* --- call to action ------------------------------------------------------ */

.legal__cta {
    margin-top: 2.4rem;
    padding: 2.2rem 1.8rem;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    background: var(--surface-2);
    text-align: center;
}

.legal__cta-text {
    margin: 0 0 1.5rem;
    color: var(--ink-muted);
    font-size: clamp(0.9rem, 2vw, 0.98rem);
    line-height: 1.75;
}

.legal__cta .button {
    border-bottom: none;
}

.legal__footer {
    margin-top: 2.4rem;
    text-align: center;
    color: var(--ink-faint);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
}

/* --- 404 ----------------------------------------------------------------- */

.error {
    max-width: 480px;
    margin: 0 auto;
    padding: 6rem 1.5rem 5rem;
    text-align: center;
}

/* A guess row that came back all-dots: nothing here is in the code. */
.error__row {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    margin: 0 auto 2.2rem;
    width: fit-content;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.error__slot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--slot);
}

.error__eyebrow {
    margin: 0 0 0.6rem;
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.error__title {
    margin: 0 0 1rem;
    font-weight: 800;
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    letter-spacing: -0.03em;
}

.error__body {
    margin: 0 0 2.4rem;
    color: var(--ink-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* --- the one button ------------------------------------------------------ */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2rem;
    min-height: 54px;
    border-radius: 18px;
    background: var(--cta);
    color: var(--cta-ink);
    font-weight: 700;
    font-size: 1rem;
    border: none;
}

.button:hover {
    background: var(--cta-hover);
    color: var(--cta-ink);
}

/* Reduce motion is a switch in the game; here there is only the one hover
   transition to drop, and honouring it costs nothing. */
@media (prefers-reduced-motion: no-preference) {
    a,
    .button {
        transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
    }
}
