:root {
    --ink: #172033;
    --muted: #667085;
    --line: #e6e9ef;
    --paper: #ffffff;
    --soft: #f6f8fb;
    --navy: #0b1d35;
    --teal: #0f9f9a;
    --coral: #f26f5b;
    --gold: #f4b860;
    --green: #1d9a62;
    --red: #c2413a;
    --radius: 8px;
    --shadow: 0 18px 45px rgba(19, 34, 58, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

:focus-visible {
    outline: 3px solid rgba(15, 159, 154, 0.35);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    padding: 10px 14px;
    background: var(--paper);
    border-radius: var(--radius);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    padding: 14px clamp(16px, 4vw, 56px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.brand,
.header-actions,
.main-nav,
.hero-actions,
.card-actions,
.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    min-width: 190px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: var(--navy);
    border-radius: 50%;
    font-size: 13px;
    letter-spacing: 0;
}

.main-nav {
    flex-wrap: wrap;
    justify-content: center;
    color: #334155;
    font-size: 15px;
}

.main-nav a,
.language {
    padding: 8px 10px;
    border-radius: var(--radius);
}

.main-nav a:hover,
.language:hover {
    background: #eef3f8;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
}

.button-primary {
    color: #fff;
    background: var(--coral);
    box-shadow: 0 10px 24px rgba(242, 111, 91, 0.28);
}

.button-primary:hover {
    background: #dc5e4d;
}

.button-ghost {
    color: var(--ink);
    background: #fff;
    border-color: var(--line);
}

.login-trigger {
    white-space: nowrap;
}

.modal-open {
    overflow: hidden;
}

.login-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 18px;
}

.login-modal[hidden] {
    display: none;
}

.login-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 29, 53, 0.58);
    backdrop-filter: blur(8px);
}

.login-dialog {
    position: relative;
    z-index: 1;
    width: min(430px, 100%);
    padding: 28px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);
}

.login-dialog h2 {
    margin-bottom: 18px;
    font-size: 26px;
}

.login-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--ink);
    background: #f2f5f8;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.login-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 5px;
    background: #eef3fb;
    border: 1px solid #c8d4e6;
    border-radius: 8px;
}

.login-choice {
    display: grid;
    gap: 8px;
    min-height: 54px;
    padding: 12px;
    text-align: center;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 7px;
}

.login-choice:hover,
.login-choice:focus-visible {
    border-color: var(--teal);
    box-shadow: 0 12px 24px rgba(15, 159, 154, 0.14);
}

.login-choice strong {
    color: #14213d;
    font-size: 16px;
}

.login-choice span {
    display: none;
    color: var(--muted);
}

.button-light {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.32);
}

.button-disabled {
    color: #5f6c7b;
    background: #e8edf3;
    cursor: not-allowed;
}

.hero {
    position: relative;
    min-height: min(720px, calc(100vh - 72px));
    display: grid;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: var(--navy);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 29, 53, 0.94), rgba(11, 29, 53, 0.62) 42%, rgba(11, 29, 53, 0.08));
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding: clamp(40px, 8vw, 96px) clamp(18px, 7vw, 86px);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--coral);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: var(--gold);
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.1;
    letter-spacing: 0;
}

h1 {
    font-size: clamp(36px, 8vw, 74px);
}

h2 {
    font-size: clamp(26px, 4vw, 42px);
}

h3 {
    font-size: 22px;
}

.hero-copy p:not(.eyebrow),
.page-intro p,
.section-heading p {
    max-width: 760px;
    color: inherit;
    font-size: 18px;
}

.section,
.page-intro,
.detail-hero,
.gallery-grid,
.contact-form,
.application-form {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 56px 0;
}

.page-intro {
    padding: 64px 0 28px;
}

.page-intro h1 {
    max-width: 900px;
}

.section-heading {
    margin-bottom: 22px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.competition-card,
.builder-panel,
.success-panel,
.contact-form,
.application-form,
.price-preview,
.key-panel,
.gallery-grid article,
.dashboard-grid > div {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.competition-card {
    overflow: hidden;
}

.competition-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.card-body {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.card-body p {
    margin: 0;
    color: var(--muted);
}

.status {
    width: fit-content;
    padding: 6px 10px;
    color: #fff;
    background: var(--teal);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.status.closed,
.status.archived {
    background: #667085;
}

.status.completed {
    background: var(--green);
}

.facts {
    display: grid;
    gap: 10px;
    margin: 0;
}

.facts div {
    display: grid;
    grid-template-columns: minmax(100px, 0.5fr) minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.facts dt {
    color: var(--muted);
    font-size: 13px;
}

.facts dd {
    margin: 0;
    font-weight: 700;
}

.split,
.detail-grid,
.admin-layout {
    display: grid;
    grid-template-columns: 0.85fr 1.4fr;
    gap: 28px;
    align-items: start;
}

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

.feature-list div {
    display: grid;
    gap: 4px;
    padding: 18px;
    background: #fff;
    border-left: 5px solid var(--teal);
    border-radius: var(--radius);
}

.feature-list span {
    color: var(--muted);
}

.filters,
.form-grid {
    display: grid;
    gap: 14px;
}

.filters {
    width: min(1180px, calc(100% - 32px));
    grid-template-columns: 1.6fr repeat(3, 1fr) auto;
    align-items: end;
    margin: 0 auto 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #cfd6e1;
    border-radius: var(--radius);
}

textarea {
    resize: vertical;
}

.detail-hero {
    display: grid;
    grid-template-columns: 0.95fr 1fr;
    gap: 26px;
    align-items: center;
    padding: 42px 0 20px;
}

.detail-hero img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.detail-hero p {
    color: var(--muted);
}

.key-panel {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 16px;
    padding: 18px;
}

.content-flow {
    display: grid;
    gap: 28px;
}

.content-flow section,
.notice-list {
    padding: 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.content-flow h2 {
    margin-bottom: 14px;
    font-size: 28px;
}

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

.chips span {
    padding: 8px 12px;
    color: #075f5d;
    background: #e8fbf8;
    border-radius: 999px;
    font-weight: 800;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

th {
    color: #344054;
    background: #f7f9fc;
    font-size: 13px;
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline div {
    display: grid;
    grid-template-columns: 130px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: #f8fafc;
    border-radius: var(--radius);
}

.timeline time {
    color: var(--coral);
    font-weight: 800;
}

.file-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    padding: 10px 14px;
    color: #075f5d;
    background: #e8fbf8;
    border-radius: var(--radius);
    font-weight: 800;
}

.application-form,
.contact-form,
.auth-card {
    display: grid;
    gap: 18px;
    padding: 22px;
    margin-bottom: 60px;
}

.auth-card {
    width: min(520px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-note {
    margin: 0;
    color: var(--muted);
}

.auth-note a {
    color: #075f5d;
    font-weight: 800;
}

.auth-shell {
    min-height: calc(100vh - 170px);
    display: grid;
    place-items: center;
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 46px 16px 64px;
}

.auth-panel {
    width: min(470px, 100%);
    padding: 30px;
    background: #fff;
    border: 1px solid #e3e8f2;
    border-radius: 14px;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.16);
}

.compact-auth {
    display: grid;
    gap: 18px;
}

.auth-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef1f6;
}

.auth-title-row .eyebrow {
    margin-bottom: 2px;
    color: #1d4f9b;
}

.auth-title-row h1 {
    font-size: 28px;
}

.auth-arrow {
    color: #111827;
    font-size: 34px;
    line-height: 1;
}

.auth-subtitle {
    margin: 0;
    text-align: center;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
}

.role-segment {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: min(280px, 100%);
    margin: 0 auto;
}

.role-segment a {
    display: grid;
    place-items: center;
    min-height: 40px;
    padding: 8px 12px;
    color: #263246;
    background: #fff;
    border: 1px solid #c9d5e8;
    border-radius: 6px;
    font-weight: 800;
}

.role-segment a.active {
    color: #fff;
    background: #274bbd;
    border-color: #274bbd;
    box-shadow: 0 8px 18px rgba(39, 75, 189, 0.22);
}

.role-segment.single {
    width: min(330px, 100%);
}

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

.auth-form label {
    gap: 7px;
    color: #263246;
}

.auth-form input {
    border-color: #c9d5e8;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.auth-form .button-primary {
    width: min(210px, 100%);
    margin: 4px auto 0;
    background: #274bbd;
    box-shadow: 0 10px 24px rgba(39, 75, 189, 0.24);
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
}

.remember-row input {
    width: 18px;
    min-height: 18px;
}

.compact-auth .auth-note {
    text-align: center;
}

.compact-auth .auth-note a {
    color: #1d5cff;
}

.inline-review-form {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(160px, 1fr) auto;
    gap: 8px;
    min-width: 620px;
    align-items: center;
}

.inline-review-form select,
.inline-review-form input {
    min-height: 40px;
}

.inline-review-form .button {
    min-height: 40px;
    padding: 8px 12px;
}

.admin-tools {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
    align-items: start;
}

.admin-tool-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.admin-tool-card:first-child {
    grid-column: 1 / -1;
}

.admin-tool-card h2 {
    font-size: 24px;
}

.admin-tool-card .form-grid {
    gap: 12px;
}

.check-chips label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    color: #075f5d;
    background: #e8fbf8;
    border-radius: 999px;
    font-size: 13px;
}

.check-chips input {
    width: 16px;
    min-height: 16px;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stepper {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 8px;
}

.stepper span {
    display: grid;
    place-items: center;
    min-height: 34px;
    color: #fff;
    background: var(--navy);
    border-radius: var(--radius);
    font-weight: 800;
}

.price-preview {
    padding: 18px;
    box-shadow: none;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
}

.checkbox input {
    width: 20px;
    min-height: 20px;
    margin-top: 2px;
}

.field-error {
    color: var(--red);
    font-weight: 800;
}

.save-stamp {
    color: var(--muted);
    font-size: 14px;
}

.flash {
    width: min(1180px, calc(100% - 32px));
    margin: 18px auto 0;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-weight: 800;
}

.flash.success {
    color: #075f5d;
    background: #e8fbf8;
}

.flash.error {
    color: #8a1f17;
    background: #fff0ec;
}

.success-panel {
    width: min(880px, calc(100% - 32px));
    margin: 0 auto 30px;
    padding: 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-grid > div {
    display: grid;
    gap: 8px;
    padding: 20px;
}

.dashboard-grid span {
    color: var(--coral);
    font-size: 32px;
    font-weight: 900;
}

.builder-panel {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.admin-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: #fff;
    background: var(--navy);
    width: 100%;
    padding-left: max(16px, calc((100vw - 1180px) / 2));
    padding-right: max(16px, calc((100vw - 1180px) / 2));
}

.admin-intro h1,
.admin-intro p {
    margin-right: 0;
}

.admin-intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.admin-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 18px;
    padding-bottom: 0;
}

.admin-subnav a {
    min-height: 42px;
    padding: 10px 14px;
    color: #22304a;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 18px rgba(19, 34, 58, 0.06);
}

.admin-subnav a:hover,
.admin-module-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 159, 154, 0.38);
}

.admin-hub {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.admin-module-card {
    display: grid;
    align-content: start;
    min-height: 168px;
    gap: 12px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.admin-module-card span {
    width: max-content;
    min-width: 46px;
    padding: 5px 10px;
    color: #fff;
    background: var(--coral);
    border-radius: 999px;
    font-weight: 900;
    text-align: center;
}

.admin-module-card strong {
    font-size: 24px;
}

.admin-module-card p {
    margin: 0;
    color: var(--muted);
}

.admin-workspace {
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
    align-items: start;
}

.admin-workspace .admin-tool-card:first-child {
    grid-column: auto;
}

.admin-list {
    min-width: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding-bottom: 60px;
}

.gallery-grid article {
    overflow: hidden;
}

.gallery-grid img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.gallery-grid h2,
.gallery-grid p {
    padding: 0 16px;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 34px clamp(16px, 4vw, 56px);
    color: #d8e0ea;
    background: var(--navy);
}

.footer p {
    margin: 8px 0 0;
    color: #a8b3c2;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

@media (max-width: 980px) {
    .site-header,
    .footer,
    .detail-hero,
    .split,
    .detail-grid,
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .site-header {
        display: grid;
    }

    .main-nav {
        justify-content: flex-start;
    }

    .filters,
    .card-grid,
    .card-grid.compact,
    .gallery-grid,
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .key-panel {
        position: static;
    }

    .timeline div {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .site-header {
        padding: 12px 16px;
    }

    .brand {
        min-width: 0;
    }

    .header-actions {
        align-items: stretch;
    }

    .main-nav,
    .header-actions,
    .hero-actions,
    .card-actions,
    .form-actions,
    .footer,
    .checkbox {
        flex-direction: column;
    }

    .main-nav a,
    .button,
    .language {
        width: 100%;
    }

    .hero {
        min-height: 620px;
    }

    .hero::after {
        background: linear-gradient(180deg, rgba(11, 29, 53, 0.92), rgba(11, 29, 53, 0.62));
    }

    .hero-copy {
        padding: 42px 18px;
    }

    .filters,
    .card-grid,
    .card-grid.compact,
    .gallery-grid,
    .dashboard-grid,
    .form-grid,
    .admin-tools,
    .admin-hub,
    .admin-workspace,
    .login-choice-grid {
        grid-template-columns: 1fr;
    }

    .admin-tool-card:first-child {
        grid-column: auto;
    }

    .admin-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-intro-actions {
        justify-content: flex-start;
    }

    .facts div {
        grid-template-columns: 1fr;
    }

    .inline-review-form {
        grid-template-columns: 1fr;
        min-width: 280px;
    }

    .auth-shell {
        min-height: auto;
        padding-top: 28px;
        padding-bottom: 42px;
    }

    .auth-panel,
    .login-dialog {
        padding: 22px;
    }

    .role-segment {
        width: 100%;
    }

    .stepper {
        grid-template-columns: repeat(3, 1fr);
    }
}
