:root {
    color-scheme: light;
    font-family: "DM Sans", sans-serif;
    background: #f8f7f3;
    color: #24231f;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    padding: 32px;
    background:
        radial-gradient(ellipse at 18% 0, rgba(216, 182, 110, .16), transparent 34rem),
        #f8f7f3;
    color: #24231f;
    transition: background-color .2s ease, color .2s ease;
}

html[data-theme="dark"] {
    color-scheme: dark;
    background: #050505;
    color: #f5f5f2;
}

html[data-theme="dark"] body {
    background:
        radial-gradient(ellipse at 18% 0, rgba(216, 182, 110, .12), transparent 34rem),
        #050505;
    color: #f5f5f2;
}

.ratings-page {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.rating-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 30px;
    border-bottom: 1px solid #dedbd2;
}

html[data-theme="dark"] .rating-header {
    border-bottom-color: rgba(255, 255, 255, .1);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #24231f;
    font-family: Manrope, sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

html[data-theme="dark"] .brand {
    color: #f5f5f2;
}

.brand img {
    width: 34px;
    height: 34px;
}

.brand > span > span,
.rating-intro h1 span {
    color: #9a7122;
}

html[data-theme="dark"] .brand > span > span,
html[data-theme="dark"] .rating-intro h1 span {
    color: #e5bf72;
}

.rating-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 16px;
}

.rating-theme-toggle {
    display: inline-flex;
    width: auto;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0 13px;
    border: 1px solid #d5c7a6;
    border-radius: 9px;
    background: #fff;
    color: #4b3b1c;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.rating-theme-toggle:hover {
    background: #f4eddd;
    filter: none;
}

.rating-theme-toggle:focus-visible,
.back-link:focus-visible,
.sign-in-notice a:focus-visible {
    outline: 2px solid #9a7122;
    outline-offset: 3px;
}

html[data-theme="dark"] .rating-theme-toggle {
    border-color: rgba(229, 191, 114, .45);
    background: #171717;
    color: #f1d99f;
}

html[data-theme="dark"] .rating-theme-toggle:hover {
    background: #24211a;
}

.rating-intro {
    max-width: 730px;
    padding: 66px 0 42px;
}

.eyebrow {
    margin: 0 0 13px;
    color: #785713;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
}

html[data-theme="dark"] .eyebrow {
    color: #d8b66e;
}

h1,
h2 {
    font-family: Manrope, sans-serif;
}

h1 {
    margin: 0;
    font-size: clamp(38px, 7vw, 64px);
    font-weight: 800;
    letter-spacing: -.065em;
    line-height: 1.04;
}

.intro {
    max-width: 570px;
    margin: 18px 0 23px;
    color: #57564f;
    font-size: 15px;
    line-height: 1.7;
}

html[data-theme="dark"] .intro {
    color: #c0c2bd;
}

.rating-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #55544d;
    font-size: 12px;
}

html[data-theme="dark"] .rating-summary {
    color: #c0c2bd;
}

.rating-summary > strong {
    color: #24231f;
    font-family: Manrope, sans-serif;
    font-size: 25px;
}

html[data-theme="dark"] .rating-summary > strong {
    color: #f5f5f2;
}

.summary-stars {
    color: #986d18;
    font-size: 18px;
    letter-spacing: .08em;
}

html[data-theme="dark"] .summary-stars {
    color: #e5bf72;
}

.ratings-layout {
    display: grid;
    grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr);
    align-items: start;
    gap: 24px;
    padding-bottom: 70px;
}

.rating-form-card,
.published-ratings {
    min-width: 0;
    padding: clamp(22px, 4vw, 32px);
    border: 1px solid #dedbd2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(34, 30, 20, .06);
}

html[data-theme="dark"] .rating-form-card,
html[data-theme="dark"] .published-ratings {
    border-color: rgba(255, 255, 255, .1);
    background: linear-gradient(150deg, #111313, #0b0c0c);
    box-shadow: none;
}

.rating-form-card h2,
.published-ratings h2 {
    margin: 0;
    color: #24231f;
    font-size: clamp(22px, 3vw, 29px);
    letter-spacing: -.04em;
}

html[data-theme="dark"] .rating-form-card h2,
html[data-theme="dark"] .published-ratings h2 {
    color: #f5f5f2;
}

.form-intro,
.rating-account,
.sign-in-notice {
    margin: 12px 0 22px;
    color: #57564f;
    font-size: 13px;
    line-height: 1.65;
}

html[data-theme="dark"] .form-intro,
html[data-theme="dark"] .rating-account,
html[data-theme="dark"] .sign-in-notice {
    color: #c0c2bd;
}

.rating-account strong {
    color: #785713;
}

html[data-theme="dark"] .rating-account strong {
    color: #e5bf72;
}

.sign-in-notice a,
.back-link {
    color: #785713;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

html[data-theme="dark"] .sign-in-notice a,
html[data-theme="dark"] .back-link {
    color: #e5bf72;
}

.back-link:hover,
.sign-in-notice a:hover {
    color: #9a7122;
    text-decoration: underline;
    text-underline-offset: 3px;
}

html[data-theme="dark"] .back-link:hover,
html[data-theme="dark"] .sign-in-notice a:hover {
    color: #f1d99f;
}

fieldset {
    min-width: 0;
    padding: 0;
    border: 0;
}

legend,
.feedback-label {
    margin-bottom: 10px;
    color: #292822;
    font-size: 12px;
    font-weight: 700;
}

html[data-theme="dark"] legend,
html[data-theme="dark"] .feedback-label {
    color: #e8e8e4;
}

.rating-options {
    display: flex;
    gap: 8px;
    margin: 2px 0 23px;
}

.rating-options label {
    position: relative;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid #d9d4c9;
    border-radius: 10px;
    background: #fbfaf7;
    color: #77746b;
    cursor: pointer;
    font-size: 24px;
    transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.rating-options label:has(input:checked) {
    border-color: #9a7122;
    background: #f5eedc;
    color: #8a641c;
}

.rating-options label:has(input:focus-visible) {
    outline: 2px solid #9a7122;
    outline-offset: 3px;
}

.rating-options input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

html[data-theme="dark"] .rating-options label {
    border-color: rgba(255, 255, 255, .12);
    background: #151616;
    color: #aaa99f;
}

html[data-theme="dark"] .rating-options label:has(input:checked) {
    border-color: #d8b66e;
    background: rgba(216, 182, 110, .12);
    color: #e5bf72;
}

html[data-theme="dark"] .rating-options label:has(input:focus-visible) {
    outline-color: #e5bf72;
}

.feedback-label {
    display: block;
}

textarea {
    display: block;
    width: 100%;
    min-height: 120px;
    resize: vertical;
    padding: 12px;
    border: 1px solid #c9c5bb;
    border-radius: 9px;
    background: #fff;
    color: #24231f;
    font: inherit;
    font-size: 13px;
    line-height: 1.6;
}

textarea:focus-visible {
    border-color: #9a7122;
    outline: 2px solid rgba(154, 113, 34, .2);
}

textarea::placeholder {
    color: #69675e;
}

html[data-theme="dark"] textarea {
    border-color: rgba(255, 255, 255, .18);
    background: #090a0a;
    color: #f5f5f2;
}

html[data-theme="dark"] textarea:focus-visible {
    border-color: #d8b66e;
    outline-color: rgba(216, 182, 110, .2);
}

html[data-theme="dark"] textarea::placeholder {
    color: #aaa99f;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 17px;
    color: #4f4e48;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.6;
}

.consent-label input {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: #9a7122;
}

html[data-theme="dark"] .consent-label {
    color: #c0c2bd;
}

html[data-theme="dark"] .consent-label input {
    accent-color: #d8b66e;
}

button:not(.rating-theme-toggle) {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    border: 1px solid #9a7122;
    border-radius: 9px;
    background: linear-gradient(125deg, #f1d99f, #dfb66b 58%, #c4974d);
    color: #17130b;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

button:not(.rating-theme-toggle):hover {
    filter: brightness(1.05);
}

button:focus-visible {
    outline: 2px solid #9a7122;
    outline-offset: 3px;
}

html[data-theme="dark"] button:focus-visible {
    outline-color: #e5bf72;
}

#ratingStatus,
.ratings-load-status {
    min-height: 18px;
    margin: 12px 0 0;
    color: #55544d;
    font-size: 12px;
    line-height: 1.6;
}

html[data-theme="dark"] #ratingStatus,
html[data-theme="dark"] .ratings-load-status {
    color: #c0c2bd;
}

#ratingStatus[data-state="success"] {
    color: #276638;
}

#ratingStatus[data-state="error"] {
    color: #a32121;
}

html[data-theme="dark"] #ratingStatus[data-state="success"] {
    color: #a5d6a7;
}

html[data-theme="dark"] #ratingStatus[data-state="error"] {
    color: #f0a3a3;
}

.privacy-note {
    margin: 21px 0 0;
    padding-top: 16px;
    border-top: 1px solid #e4e0d6;
    color: #57564f;
    font-size: 12px;
    line-height: 1.65;
}

html[data-theme="dark"] .privacy-note {
    border-top-color: rgba(255, 255, 255, .09);
    color: #b0b2ac;
}

.published-ratings-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 17px;
}

.published-ratings-heading .eyebrow {
    margin-bottom: 9px;
}

.gold-star {
    color: #986d18;
    font-size: 25px;
}

html[data-theme="dark"] .gold-star {
    color: #e5bf72;
}

.public-ratings-list {
    display: grid;
    gap: 12px;
}

.public-rating-card {
    min-width: 0;
    padding: 17px;
    border: 1px solid #e3dfd6;
    border-radius: 11px;
    background: #faf9f6;
}

html[data-theme="dark"] .public-rating-card {
    border-color: rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .035);
}

.public-rating-stars {
    color: #986d18;
    font-size: 16px;
    letter-spacing: .08em;
}

html[data-theme="dark"] .public-rating-stars {
    color: #e5bf72;
}

.public-rating-feedback {
    margin: 11px 0 14px;
    color: #3e3d37;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

html[data-theme="dark"] .public-rating-feedback {
    color: #d0d2cc;
}

.public-rating-attribution {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #57564f;
    font-size: 11px;
}

html[data-theme="dark"] .public-rating-attribution {
    color: #b0b2ac;
}

.public-rating-attribution strong {
    color: #24231f;
    font-size: 12px;
}

html[data-theme="dark"] .public-rating-attribution strong {
    color: #f2f2ed;
}

.public-ratings-empty {
    margin: 0;
    padding: 16px;
    border: 1px dashed #c9c5bb;
    border-radius: 10px;
    color: #4f4e48;
    font-size: 13px;
    line-height: 1.65;
}

html[data-theme="dark"] .public-ratings-empty {
    border-color: rgba(255, 255, 255, .2);
    color: #c0c2bd;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

[hidden] {
    display: none !important;
}

@media (max-width: 760px) {
    body {
        padding: 20px;
    }

    .rating-intro {
        padding: 49px 0 31px;
    }

    .ratings-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    body {
        padding: 14px;
    }

    .rating-header {
        align-items: flex-start;
        padding-bottom: 21px;
    }

    .rating-header-actions {
        flex-direction: column-reverse;
        align-items: flex-end;
        gap: 10px;
    }

    .rating-header-actions .back-link {
        font-size: 11px;
    }

    .rating-theme-toggle {
        min-height: 44px;
        padding: 0 10px;
        font-size: 11px;
    }

    .rating-form-card,
    .published-ratings {
        border-radius: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
