:root {
    --page: #f3f7ef;
    --panel: #ffffff;
    --ink: #171717;
    --muted: #62675d;
    --line: #191919;
    --leaf: #d9f06b;
    --coral: #ff6b6b;
    --yellow: #ffd166;
    --blue: #8da8ff;
    --shadow: 8px 8px 0 #171717;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(23, 23, 23, .055) 1px, transparent 1px),
        linear-gradient(rgba(23, 23, 23, .055) 1px, transparent 1px),
        var(--page);
    background-size: 34px 34px;
    font-family: Arial, Helvetica, sans-serif;
}

button,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

.shell {
    width: min(1120px, calc(100% - 32px));
    min-height: calc(100vh - 32px);
    margin: 16px auto;
    padding: 18px clamp(16px, 4vw, 44px) 18px;
    display: flex;
    flex-direction: column;
    border: 3px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--shadow);
}

.shell-page {
    background: rgba(255, 255, 255, .94);
}

.nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-weight: 800;
}

.nav a {
    padding: 8px 13px;
    border: 2px solid transparent;
    border-radius: 8px;
    text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
    border-color: var(--line);
    background: var(--leaf);
}

.screen {
    width: min(780px, 100%);
    margin: 0 auto;
    padding: clamp(38px, 7vw, 78px) 0 34px;
    text-align: center;
}

.screen-start {
    width: min(980px, 100%);
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: clamp(28px, 6vw, 64px);
    align-items: center;
    text-align: left;
}

.intro-copy {
    min-width: 0;
}

.spark-image {
    width: 100%;
    max-width: 420px;
    justify-self: center;
    border: 3px solid var(--line);
    border-radius: 8px;
    box-shadow: 8px 8px 0 var(--yellow);
}

.eyebrow {
    width: max-content;
    max-width: 100%;
    margin: 0 0 14px;
    padding: 6px 10px;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: var(--leaf);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.screen:not(.screen-start) .eyebrow {
    margin-left: auto;
    margin-right: auto;
}

.screen h1 {
    margin: 0 0 18px;
    font-size: clamp(2.2rem, 5.2vw, 5rem);
    line-height: .98;
    letter-spacing: 0;
}

.ideas-page h1 {
    font-size: clamp(2.1rem, 4.4vw, 4.4rem);
}

.about-page {
    width: min(820px, 100%);
    text-align: left;
}

.about-page .eyebrow {
    margin-left: 0;
    margin-right: 0;
}

.about-page h1 {
    max-width: 720px;
}

.about-page h2 {
    margin: 42px 0 12px;
    font-size: clamp(1.55rem, 3vw, 2.5rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.about-content {
    display: grid;
    gap: 18px;
    font-size: clamp(1.05rem, 1.8vw, 1.22rem);
    line-height: 1.55;
}

.about-content p,
.about-content ul,
.about-content ol {
    margin: 0;
}

.about-content ul,
.about-content ol {
    padding-left: 1.35em;
}

.about-content li + li {
    margin-top: 8px;
}

.about-callout {
    margin: 12px 0;
    padding: 20px 22px;
    display: grid;
    gap: 4px;
    border: 3px solid var(--line);
    border-radius: 8px;
    background: var(--yellow);
    box-shadow: 6px 6px 0 var(--line);
    font-size: clamp(1.3rem, 2.8vw, 2rem);
    font-weight: 900;
    line-height: 1.15;
}

.habit {
    max-width: 520px;
    margin: 0 0 30px;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 700;
    line-height: 1.35;
}

.ideas-page .habit {
    margin-left: auto;
    margin-right: auto;
}

.button {
    min-width: 148px;
    min-height: 48px;
    padding: 12px 22px;
    border: 2px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    font-weight: 900;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--line);
}

.button:disabled {
    cursor: wait;
    opacity: .65;
    transform: none;
    box-shadow: none;
}

.button-dark {
    background: var(--yellow);
}

.button-light {
    background: var(--panel);
}

.screen-start .button {
    min-width: 250px;
    min-height: 76px;
    padding: 18px 34px;
    border-width: 3px;
    background: var(--yellow);
    box-shadow: 7px 7px 0 var(--line);
    font-size: 1.35rem;
}

.screen-start .button:hover {
    box-shadow: 9px 9px 0 var(--line);
}

.start-count {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: .95rem;
    font-weight: 900;
}

.timer {
    width: max-content;
    margin: 0 auto 28px;
    padding: 10px 18px;
    border: 3px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 6px 6px 0 var(--coral);
    font-size: clamp(2.8rem, 7vw, 5.4rem);
    font-weight: 900;
}

.ideas-form {
    display: grid;
    gap: 16px;
}

.ideas-form label {
    display: grid;
    gap: 6px;
    text-align: left;
}

.ideas-form span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

textarea {
    width: 100%;
    min-height: 64px;
    padding: 15px 16px;
    resize: vertical;
    border: 3px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--panel);
    box-shadow: 4px 4px 0 rgba(23, 23, 23, .12);
}

textarea:focus {
    outline: 4px solid rgba(47, 143, 134, .25);
}

.result-list,
.public-list {
    display: grid;
    gap: 16px;
    text-align: left;
}

.result-item,
.public-idea,
.empty-public {
    border: 3px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 5px 5px 0 rgba(23, 23, 23, .16);
}

.result-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
}

.public-idea,
.empty-public {
    margin: 0;
    padding: 18px 20px;
}

.public-idea {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}

.public-idea:nth-child(4n + 1) {
    box-shadow: 5px 5px 0 var(--leaf);
}

.public-idea:nth-child(4n + 2) {
    box-shadow: 5px 5px 0 var(--yellow);
}

.public-idea:nth-child(4n + 3) {
    box-shadow: 5px 5px 0 var(--blue);
}

.public-idea:nth-child(4n + 4) {
    box-shadow: 5px 5px 0 var(--coral);
}

.result-item p,
.public-idea p,
.empty-public {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.42;
}

.tweet-link {
    min-width: 78px;
    padding: 8px 11px;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: .9rem;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.tweet-link:hover {
    background: var(--blue);
}

.copy-button {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    border: 0;
    border-radius: 8px;
    background: rgba(23, 23, 23, .06);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    transition: transform 120ms ease, background 120ms ease;
}

.copy-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.copy-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.copy-button:hover,
.copy-button.is-copied {
    background: var(--leaf);
}

.copy-button:hover {
    transform: translateY(-1px);
}

.copy-button.is-copied {
    color: #0f5f36;
}

.actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 32px;
}

.publish-form input[name="website"] {
    position: absolute;
    left: -9999px;
}

.status,
.empty-result {
    min-height: 24px;
    margin: 18px 0 0;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.status a {
    text-decoration-thickness: 2px;
}

.footer {
    margin-top: auto;
    padding-top: 24px;
    display: flex;
    justify-content: center;
    gap: 12px 18px;
    flex-wrap: wrap;
    text-align: center;
    font-weight: 900;
}

.footer a {
    text-decoration-thickness: 2px;
}

.is-hidden {
    display: none;
}

@media (max-width: 760px) {
    .shell {
        width: calc(100% - 18px);
        min-height: calc(100vh - 18px);
        margin: 9px auto;
        padding: 14px;
        box-shadow: 5px 5px 0 #171717;
    }

    .intro-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .eyebrow,
    .intro-copy .eyebrow {
        margin-left: auto;
        margin-right: auto;
    }

    .habit {
        margin-left: auto;
        margin-right: auto;
    }

    .spark-image {
        max-width: 320px;
        order: -1;
    }

    .result-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .public-idea {
        grid-template-columns: 1fr;
    }

    .tweet-link {
        width: max-content;
    }

    .copy-button {
        justify-self: start;
    }
}
