:root {
    --bg: #fef3c7;
    --ink: #111;
    --paper: #fff;
    --muted: #555;
    --yellow: #facc15;
    --pink: #fb7185;
    --purple: #a78bfa;
    --green: #86efac;
    --red: #fca5a5;
    --silver: #d1d5db;
    --bronze: #fdba74;
    --border: 3px solid var(--ink);
    --shadow: 5px 5px 0 var(--ink);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Space Grotesk", system-ui, -apple-system, sans-serif;
    line-height: 1.4;
}

.container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 28px 24px;
}

.box {
    background: var(--paper);
    border: var(--border);
    box-shadow: var(--shadow);
}

.btn {
    font: inherit;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
    transition: transform 0.08s, box-shadow 0.08s;
}

.btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 var(--ink);
}

.btn:active {
    transform: translate(5px, 5px);
    box-shadow: 0 0 0 var(--ink);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: stretch;
    gap: 16px;
    /* stretch the background over the container's side padding */
    margin: 0 -24px;
    padding: 12px 24px 16px;
    background: var(--bg);
    border-bottom: var(--border);
}

.logo {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    background: var(--ink);
    border: var(--border);
    color: var(--bg);
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.search-form {
    display: flex;
    flex: 1;
    gap: 16px;
}

.search-input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    font: inherit;
    font-size: 17px;
    font-weight: 500;
    color: var(--ink);
}

.search-input:focus {
    outline: none;
    box-shadow: 5px 5px 0 var(--purple);
}

.search-btn {
    padding: 12px 22px;
    background: var(--pink);
    font-size: 17px;
}

.error {
    display: inline-block;
    margin: 24px 0 0;
    padding: 8px 14px;
    background: var(--red);
    font-weight: 700;
}

.page-title {
    margin: 36px 0 4px;
    font-size: 44px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 0;
    font-weight: 500;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 16px 0 30px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tab {
    padding: 6px 14px;
    background: var(--paper);
    border: var(--border);
}

.tab.active {
    background: var(--purple);
    box-shadow: 4px 4px 0 var(--ink);
}

.row {
    scroll-margin-top: 100px;
    display: grid;
    grid-template-columns: 60px 1fr 260px 90px;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    padding: 16px;
    box-shadow: 6px 6px 0 var(--ink);
}

.row-rank {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
}

.row-name {
    margin: 0;
    font-size: 19px;
}

.row-address {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.row-summary {
    margin: 8px 0 0;
    font-size: 14px;
}

.row-hours {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 700;
}

.loading {
    color: var(--muted);
    font-style: italic;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    padding: 2px 8px;
    background: var(--paper);
    border: 2px solid var(--ink);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.tag.yellow { background: var(--yellow); }
.tag.green { background: var(--green); }
.tag.red { background: var(--red); }

.row-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 0 8px;
    background: var(--purple);
    border: var(--border);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.score-label {
    margin-bottom: 4px;
    font-size: 10px;
    letter-spacing: 0.08em;
}

.how-btn {
    padding: 6px 12px;
    background: var(--yellow);
    border: var(--border);
    font-size: 13px;
}

.how-btn.active {
    box-shadow: 4px 4px 0 var(--ink);
}

.how-panel {
    margin: -10px 0 30px;
    padding: 18px 20px;
}

.how-panel h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.how-panel p,
.how-panel li {
    font-size: 15px;
}

.how-panel p {
    margin: 0 0 8px;
}

.how-panel ul {
    margin: 0 0 8px;
    padding-left: 20px;
}

.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
    margin-bottom: 34px;
}

.pod {
    flex: 0 1 300px;
    min-width: 0;
    text-align: center;
}

.pod-card {
    margin-bottom: 14px;
    padding: 12px;
}

.pod-name {
    margin: 0;
    font-size: 17px;
}

.pod-stats {
    margin: 2px 0 8px;
    font-size: 14px;
    font-weight: 500;
}

.pod-summary {
    display: -webkit-box;
    margin: 10px 0 0;
    overflow: hidden;
    font-size: 13px;
    text-align: left;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.pod-card.expandable {
    cursor: pointer;
}

.pod-card.expanded .pod-summary {
    display: block;
    -webkit-line-clamp: unset;
}

.pod-toggle {
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.pod-block {
    display: grid;
    place-items: start center;
    padding-top: 12px;
    border: var(--border);
    font-size: 48px;
    font-weight: 700;
}

.pod-1 .pod-block { height: 220px; background: var(--yellow); }
.pod-2 .pod-block { height: 170px; background: var(--silver); }
.pod-3 .pod-block { height: 130px; background: var(--bronze); }

.hero h1 {
    margin: 12vh 0 16px;
    font-size: clamp(48px, 9vw, 96px);
    line-height: 0.95;
    letter-spacing: -0.03em;
}

.hero p {
    max-width: 620px;
    margin: 0;
    font-size: 19px;
    font-weight: 500;
}

.examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    font-weight: 700;
}

.chip {
    padding: 8px 14px;
    background: var(--yellow);
    text-decoration: none;
}

.chip:nth-of-type(2) { background: var(--green); }
.chip:nth-of-type(3) { background: var(--purple); }

.empty {
    margin-top: 30px;
    padding: 48px 24px;
    text-align: center;
}

.empty h2 {
    margin: 0 0 6px;
    font-size: 28px;
}

.empty p {
    margin: 0;
    font-weight: 500;
}
.pod-card .map-link {
    display: block;
    width: fit-content;
    margin: 8px auto 0;
}
.account-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    margin: -12px 0 10px;
    font-size: 13px;
    font-weight: 500;
}
.account-bar form {
    margin: 0;
}
.account-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}
.account-link:hover {
    background: var(--yellow);
}
.auth {
    max-width: 440px;
    margin: 0 auto 60px;
}
.auth .error {
    display: block;
    margin: 0 0 18px;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.auth-form label {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.auth-btn {
    margin-top: 22px;
    padding: 12px 22px;
    background: var(--pink);
    font-size: 17px;
}
.auth-link {
    margin-top: 24px;
    font-weight: 600;
}
.auth-link a {
    color: var(--ink);
    font-weight: 800;
}
.fav-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 30px 0 60px;
}

.fav-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
}

.fav-item form {
    margin: 0;
}

.fav-remove {
    padding: 8px 14px;
    background: var(--red);
    font-size: 13px;
}

.fav-btn {
    display: inline-block;
    margin-top: 8px;
    margin-left: 8px;
    padding: 3px 10px;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.fav-btn:hover {
    background: var(--yellow);
}

.fav-btn.saved {
    background: var(--pink);
}

.pod-card .fav-btn {
    display: block;
    width: fit-content;
    margin: 8px auto 0;
}

.fav-item > div {
    flex: 1;
    min-width: 0;
}

.fav-note {
    display: flex;
    gap: 8px;
    max-width: 480px;
    margin-top: 10px;
}

.fav-note input,
.fav-note button {
    padding: 6px 10px;
    border: 2px solid var(--ink);
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
}

.fav-note input {
    flex: 1;
    min-width: 0;
}

.fav-note button {
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 700px) {
    .pod-card .map-link {
        margin-left: 0;
    }

    .pod-card .fav-btn {
        margin-left: 0;
    }
    .container {
        padding: 20px 16px;
    }

    .topbar {
        gap: 8px;
        margin: 0 -16px;
        padding: 10px 16px 12px;
    }

    .logo {
        padding: 6px 8px;
        font-size: 15px;
    }

    .search-input {
        padding: 10px 12px;
        font-size: 16px;
    }

    .row {
        scroll-margin-top: 90px;
    }

    .search-form {
        gap: 8px;
    }

    .search-btn {
        padding: 10px 10px;
        font-size: 14px;
    }

    .page-title {
        margin-top: 24px;
        font-size: 32px;
    }

    .tabs {
        gap: 8px;
    }

    .tab {
        padding: 6px 9px;
        font-size: 13px;
    }

    .podium {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .pod {
        display: flex;
        flex: none;
        align-items: stretch;
    }

    .pod-1 { order: 1; }
    .pod-2 { order: 2; }
    .pod-3 { order: 3; }

    .pod-card {
        flex: 1;
        min-width: 0;
        margin: 0;
        text-align: left;
    }

    .pod .pod-block {
        order: -1;
        flex: none;
        width: 64px;
        height: auto;
        margin-right: 12px;
        place-items: center;
        padding: 0;
        font-size: 36px;
    }

    .row {
        grid-template-columns: 44px 1fr;
        gap: 12px;
    }

    .row-rank {
        grid-row: span 3;
        align-self: start;
        font-size: 28px;
    }

    .tags,
    .row-score {
        grid-column: 2;
    }

    .row-score {
        justify-self: start;
        padding: 4px 12px;
        font-size: 20px;
    }
}

.summarize-btn {
    margin-top: 8px;
    padding: 3px 10px;
    background: var(--paper);
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.summarize-btn:hover {
    background: var(--purple);
}

.map-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
}   
.map-link:hover {
    background: var(--yellow);
}
.load-more {
    display: block;
    width: fit-content;
    margin: 10px auto 40px;
    padding: 12px 28px;
    background: var(--yellow);
    text-decoration: none;
}
