@font-face {
    font-family: "Public Sans";
    src: url("../fonts/public-sans-latin-400-normal.woff2") format("woff2");
    font-weight: 400; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Public Sans";
    src: url("../fonts/public-sans-latin-ext-400-normal.woff2") format("woff2");
    font-weight: 400; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Public Sans";
    src: url("../fonts/public-sans-latin-600-normal.woff2") format("woff2");
    font-weight: 600; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Public Sans";
    src: url("../fonts/public-sans-latin-ext-600-normal.woff2") format("woff2");
    font-weight: 600; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Public Sans";
    src: url("../fonts/public-sans-latin-700-normal.woff2") format("woff2");
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Public Sans";
    src: url("../fonts/public-sans-latin-ext-700-normal.woff2") format("woff2");
    font-weight: 700; font-style: normal; font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --navy: #003366;
    --navy-deep: #00203f;
    --gold: #f2c200;
    --page: #f2f4f7;
    --surface: #ffffff;
    --ink: #1b2430;
    --muted: #556070;
    --line: #d5dbe3;
    --open: #146c43;
    --warn-bg: #fff6d6;
    --warn-line: #b38600;
    --error-bg: #fbe9e9;
    --error-line: #b42318;
    --gap: 1rem;
}

@media (min-width: 768px) {
    :root {
        --gap: 1.5rem;
    }
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: "Public Sans", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ink);
    background-color: var(--page);
}

@media (min-width: 768px) {
    body {
        font-size: 1.0625rem;
    }
}

a {
    color: var(--navy);
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--navy-deep);
}

.skip-link:focus {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
    padding: 0.5rem 1rem;
    background: var(--gold);
    color: #000000;
    font-weight: 700;
}

/* Header: one band, logo left, service name right */

.site-header {
    background-color: var(--navy);
    border-bottom: 3px solid var(--gold);
    flex-shrink: 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.site-logo {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
}

.site-logo img {
    display: block;
    width: auto;
    height: 38px;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
}

@media (min-width: 768px) {
    .site-logo img {
        height: 52px;
    }

    .site-header .container {
        padding-top: 0.625rem;
        padding-bottom: 0.625rem;
    }
}

.service-id {
    flex: 0 0 auto;
    text-align: right;
    line-height: 1.25;
}

.service-name {
    display: block;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
}

.service-name:hover {
    color: #ffffff;
    text-decoration: underline;
}

.service-year {
    display: block;
    color: #c9d3e0;
    font-size: 0.75rem;
}

@media (min-width: 576px) {
    .service-name {
        font-size: 1rem;
    }

    .service-year {
        font-size: 0.875rem;
    }
}

/* Main */

.site-main {
    flex: 1 0 auto;
    padding: var(--gap) 0 calc(var(--gap) * 1.5);
}

.content {
    max-width: 48rem;
}

.content--wide {
    max-width: none;
}

.page-back {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

.page-title {
    font-size: clamp(1.375rem, 1.05rem + 1.6vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 0.375rem;
}

.page-lead {
    font-size: 1.0625rem;
    color: var(--muted);
    margin-bottom: var(--gap);
}

@media (min-width: 768px) {
    .page-lead {
        font-size: 1.1875rem;
    }
}

@media (max-width: 399.98px) {
    .page-lead--home {
        display: none;
    }
}

/* Home: the two tasks */

.task-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 640px) {
    .task-list {
        grid-template-columns: 1fr 1fr;
        gap: var(--gap);
    }
}

.task {
    display: flex;
    flex-direction: column;
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-top: 4px solid var(--navy);
    border-radius: 6px;
    padding: 1rem 1.125rem 1.125rem;
}

@media (min-width: 768px) {
    .task {
        padding: 1.25rem 1.5rem 1.5rem;
    }
}

.task-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem 0.75rem;
    margin-bottom: 0.375rem;
}

.task h2 {
    font-size: 1.1875rem;
    font-weight: 700;
    margin: 0;
}

@media (min-width: 768px) {
    .task h2 {
        font-size: 1.3125rem;
    }
}

.task p {
    color: var(--muted);
    margin-bottom: 0.875rem;
}

.task .btn {
    margin-top: auto;
    align-self: flex-start;
}

.task-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--open);
    white-space: nowrap;
}

.task-status::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: currentColor;
}

.task-status.is-closed {
    color: var(--muted);
}

/* Buttons */

.btn-ku,
.btn-ku-outline {
    border: 2px solid var(--navy);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
}

.btn-ku {
    background-color: var(--navy);
    color: #ffffff;
}

.btn-ku:hover,
.btn-ku:active {
    background-color: var(--navy-deep);
    border-color: var(--navy-deep);
    color: #ffffff;
}

.btn-ku-outline {
    background-color: transparent;
    color: var(--navy);
}

.btn-ku-outline:hover,
.btn-ku-outline:active {
    background-color: var(--navy);
    color: #ffffff;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: var(--gap);
}

@media (max-width: 479.98px) {
    .btn-row .btn {
        flex: 1 1 0;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .task p {
        margin-bottom: 0.625rem;
    }
}

/* Form */

.form-panel {
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1.125rem;
}

@media (min-width: 768px) {
    .form-panel {
        padding: 1.5rem;
    }
}

.form-panel .form-label {
    font-weight: 700;
    font-size: 1.0625rem;
    margin-bottom: 0.125rem;
}

.form-panel .form-text {
    color: var(--muted);
    font-size: 0.9375rem;
    margin-top: 0;
    margin-bottom: 0.625rem;
}

.form-inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.form-panel .form-control {
    flex: 1 1 14rem;
    max-width: 22rem;
    border: 2px solid #6b7684;
    border-radius: 6px;
    font-size: 1.125rem;
    letter-spacing: 0.03em;
    padding: 0.4375rem 0.75rem;
}

.form-inline-row .btn {
    flex: 0 0 auto;
}

@media (max-width: 479.98px) {
    .form-panel .form-control {
        max-width: none;
        flex-basis: 100%;
    }

    .form-inline-row .btn {
        flex: 1 1 100%;
    }
}

/* Result: room slip */

.room-slip {
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.room-slip + .room-slip {
    margin-top: var(--gap);
}

.room-slip__place {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
}

.room-slip__hostel {
    grid-column: 1 / -1;
    background-color: var(--navy);
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-bottom: 3px solid var(--gold);
}

.room-slip__hostel span,
.room-slip__cell span,
.room-slip__details dt {
    display: block;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--muted);
}

.room-slip__hostel span {
    color: #c9d3e0;
}

.room-slip__hostel strong {
    display: block;
    font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.room-slip__cell {
    padding: 0.625rem 1rem;
    min-width: 0;
}

.room-slip__cell + .room-slip__cell {
    border-left: 1px solid var(--line);
}

.room-slip__cell strong {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.room-slip__cell--room strong {
    font-size: 1.75rem;
    line-height: 1.1;
    color: var(--navy);
}

.room-slip__details {
    display: grid;
    gap: 0.375rem;
    margin: 0;
    padding: 0.75rem 1rem;
}

.room-slip__details div {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: baseline;
}

.room-slip__details dt {
    font-size: 0.875rem;
}

.room-slip__details dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

@media (min-width: 768px) {
    .room-slip__place {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr);
    }

    .room-slip__hostel {
        grid-column: auto;
        border-bottom: 0;
        border-right: 4px solid var(--gold);
        padding: 1rem 1.25rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .room-slip__hostel + .room-slip__cell {
        border-left: 0;
    }

    .room-slip__cell {
        padding: 1rem 1.25rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .room-slip__cell--room strong {
        font-size: 2.25rem;
    }

    .room-slip__details {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
        padding: 0.875rem 1.25rem 1rem;
    }

    .room-slip__details div {
        display: block;
    }
}

/* Notices */

.notice {
    border-left: 5px solid var(--warn-line);
    background-color: var(--warn-bg);
    border-radius: 0 6px 6px 0;
    padding: 0.875rem 1.125rem;
}

.notice--error {
    border-left-color: var(--error-line);
    background-color: var(--error-bg);
}

.notice h2 {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
}

.notice p {
    margin: 0;
}

/* Footer */

.site-footer {
    flex-shrink: 0;
    background-color: var(--navy-deep);
    color: #c9d3e0;
    font-size: 0.875rem;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 1.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.site-footer a {
    color: #ffffff;
}

/* Short screens (small laptops, landscape phones) */

@media (max-height: 700px) and (min-width: 768px) {
    :root {
        --gap: 1.125rem;
    }

    .page-title {
        font-size: 1.875rem;
    }
}

/* Focus */

a:focus-visible,
.btn:focus-visible,
.form-control:focus {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--navy-deep);
}

.form-control:focus {
    border-color: var(--navy);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
