@font-face {
    font-family: 'MyDisplay';
    src: url('../src/assets/fonts/ExplorerCondensed-Bold.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --abyss-teal: #eef3f8;
    --deep-fjord: #042330;
    --fjord-surface: #072e3d;
    --glacier: #1f7fd1;
    --glacier-hover: #2f8fe0;
    --alpine-red: #FF3B30;
    --alpine-red-hover: #E03126;
    --alpine-white: #FFFFFF;
    --ice-white: #1d2b3a;
    --text-dim: rgba(29, 43, 58, 0.7);
    --text-faint: rgba(29, 43, 58, 0.45);
    --border: rgba(31, 127, 209, 0.22);
    --border-subtle: rgba(29, 43, 58, 0.08);
    --border-strong: rgba(31, 127, 209, 0.5);

    --poly-fill-1: rgba(31, 127, 209, 0.06);
    --poly-fill-2: rgba(31, 127, 209, 0.03);
    --poly-fill-3: rgba(255, 255, 255, 0.5);

    --surface-card-a: #ffffff;
    --surface-card-b: #f4f8fc;
    --navy-heading: #245685;

    --font-display: 'Anton', sans-serif;
    --font-titles: 'MyDisplay', sans-serif;
    --font-stencil: 'Allerta Stencil', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

html.kitchen-open,
body.kitchen-open {
    overflow: hidden;
}

body {
    background: var(--abyss-teal);
    color: var(--ice-white);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ============ GLOBAL BACKGROUND POLYGON LAYER ============ */
.bg-polygon-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-polygon-layer svg {
    width: 100%;
    height: 100%;
    display: block;
}

.shell {
    max-width: 980px;
    margin: 0 auto;
    padding: calc(68px + 2rem) clamp(1rem, 3.5vw, 2.5rem) 60px;
    position: relative;
    z-index: 2;
    width: 100%;
    flex: 1;
}

/* ============ TYPOGRAPHY & LABELS ============ */
.eyebrow-label {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--glacier);
    display: block;
    margin-bottom: 0.4rem;
}

.section-title {
    font-family: var(--font-titles);
    font-size: clamp(3.3rem, 6vw, 4.8rem);
    color: var(--navy-heading);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* ============ HEADER & NAVIGATION ============ */
header.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #042330;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    height: 68px;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(0.75rem, 3vw, 2rem);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    min-width: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    background: var(--deep-fjord);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--glacier);
    flex-shrink: 0;
}

.brand-text {
    min-width: 0;
}

.brand-text .brand-name {
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--alpine-white);
    display: block;
    white-space: nowrap;
}

.brand-text .brand-role {
    display: block;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

/* ============ BUTTON SYSTEM ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.7rem 1.25rem;
    cursor: pointer;
    border: 0;
    transition: all 0.2s ease;
    text-decoration: none;
    border-radius: 0;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn.primary {
    background: var(--glacier);
    color: #FFFFFF;
}

.btn.primary:hover:not(:disabled) {
    background: var(--glacier-hover);
}

.btn.danger {
    background: var(--alpine-red);
    color: var(--alpine-white);
}

.btn.danger:hover:not(:disabled) {
    background: var(--alpine-red-hover);
}

.btn.outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--navy-heading);
}

.btn.outline:hover:not(:disabled) {
    border-color: var(--glacier);
    color: var(--glacier);
}

.nav-inner .btn.outline {
    color: var(--alpine-white);
    border-color: rgba(255, 255, 255, 0.25);
}

.nav-inner .btn.outline:hover:not(:disabled) {
    color: var(--glacier-hover);
    border-color: var(--glacier-hover);
}

.btn.ghost {
    background: transparent;
    color: var(--text-dim);
    padding: 0.45rem 0.75rem;
}

.btn.ghost:hover:not(:disabled) {
    color: var(--glacier);
}

.btn.small {
    padding: 0.45rem 0.75rem;
    font-size: 0.72rem;
}

.btn.full {
    width: 100%;
}

.icon-vector {
    width: 1.05em;
    height: 1.05em;
    fill: currentColor;
    display: inline-block;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.btn:hover .icon-arrow-right {
    transform: translateX(3px);
}

.btn:hover .icon-arrow-left {
    transform: translateX(-3px);
}

/* ============ INPUTS & FORM FIELDS ============ */
.field {
    margin-bottom: 1.35rem;
}

.field label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--glacier);
    margin-bottom: 0.5rem;
}

input[type=email],
input[type=password],
input[type=text],
input[type=number],
textarea,
select {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--navy-heading);
    padding: 0.75rem 0.9rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    border-radius: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--glacier);
    box-shadow: 0 0 0 1px var(--glacier);
}

input[type=number] {
    -moz-appearance: textfield;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-stepper {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    background: #ffffff;
    flex: 1;
    min-width: 100px;
}

.qty-stepper input[type=number] {
    border: none;
    text-align: center;
    flex: 1;
    min-width: 36px;
    background: transparent;
    padding: 0.75rem 0.25rem;
}

.qty-stepper input[type=number]:focus {
    box-shadow: none;
}

.qty-stepper .qty-btn {
    background: transparent;
    border: none;
    color: var(--glacier);
    font-weight: 800;
    font-size: 1rem;
    width: 32px;
    cursor: pointer;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-stepper .qty-btn:hover {
    background: rgba(31, 127, 209, 0.1);
}

.qty-stepper .qty-btn:first-child {
    border-right: 1px solid var(--border);
}

.qty-stepper .qty-btn:last-child {
    border-left: 1px solid var(--border);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231f7fd1'%3E%3Cpath d='M5.5 7.5l4.5 4.5 4.5-4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 32px;
}

/* ============ LOGIN SCREEN ============ */
#login-screen {
    max-width: 420px;
    margin: 100px auto 40px;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, var(--surface-card-a) 0%, var(--surface-card-b) 100%);
    border: 1px solid var(--border);
    box-shadow: 0 20px 45px rgba(20, 36, 58, 0.12);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    position: relative;
    z-index: 2;
    width: calc(100% - 2rem);
}

#login-screen h1 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    text-transform: uppercase;
    color: var(--navy-heading);
    letter-spacing: 0.02em;
    margin-bottom: 0.25rem;
}

#login-screen p {
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

#error-msg {
    color: var(--alpine-red);
    font-size: 0.78rem;
    margin-top: 0.85rem;
    font-weight: 600;
    min-height: 18px;
}

/* ============ BROWSE VIEW & CARDS ============ */
.section-head-browse {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-bar {
    margin-bottom: 1.75rem;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.recipe-card {
    background: linear-gradient(135deg, var(--surface-card-a) 0%, var(--surface-card-b) 100%);
    
    padding: 1.35rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
    box-shadow: 0 10px 25px rgba(20, 36, 58, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.recipe-card:hover {
    transform: translateY(-2px);
    border-color: var(--glacier);
    box-shadow: 0 12px 30px rgba(31, 127, 209, 0.2);
}

.rc-image-wrap {
    width: calc(100% + 2.7rem);
    margin: -1.35rem -1.35rem 1rem;
    height: 155px;
    position: relative;
    background: var(--deep-fjord);
    overflow: hidden;
}

.rc-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.recipe-card:hover .rc-image-wrap img {
    transform: scale(1.0);
}

.rc-badge-pill {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    background: rgba(4, 35, 48, 0.88);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 8px;
    z-index: 2;
}

.recipe-card h3 {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--navy-heading);
    margin-bottom: 0.4rem;
    line-height: 1.25;
    word-break: break-word;
}

/* Clamped description prevents edge-spill */
.rc-description-clamped {
    font-size: 0.84rem;
    color: var(--text-dim);
    line-height: 1.45;
    margin-bottom: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipe-card .rc-meta {
    font-size: 0.74rem;
    color: var(--text-dim);
    display: flex;
    gap: 0.6rem 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
    font-family: var(--font-mono);
}

.recipe-card .rc-tags {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.rc-tag {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(31, 127, 209, 0.12);
    color: var(--glacier);
    border: 1px solid rgba(31, 127, 209, 0.25);
    padding: 2px 7px;
}

.empty-state {
    color: var(--text-dim);
    font-size: 0.9rem;
    padding: 3rem 1.5rem;
    text-align: center;
    border: 1px dashed var(--border);
    background: rgba(31, 127, 209, 0.04);
    grid-column: 1 / -1;
}

/* ============ DETAIL VIEW ============ */
.detail-panel {
    background: linear-gradient(135deg, var(--surface-card-a) 0%, var(--surface-card-b) 100%);
    border: 1px solid var(--border);
    padding: clamp(1.75rem, 4.5vw, 2.75rem);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
    box-shadow: 0 15px 35px rgba(20, 36, 58, 0.1);
}

.detail-image-container {
    width: calc(100% + clamp(3.5rem, 9vw, 5.5rem));
    margin: calc(-1 * clamp(1.75rem, 4.5vw, 2.75rem)) calc(-1 * clamp(1.75rem, 4.5vw, 2.75rem)) 2.25rem;
    max-height: 400px;
    overflow: hidden;
    position: relative;
    background: var(--deep-fjord);
}

.detail-image-container img {
    width: 100%;
    height: 100%;
    max-height: 380px;
    object-fit: cover;
    display: block;
}

.detail-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 35, 48, 0) 55%, rgba(4, 35, 48, 0.55) 100%);
    pointer-events: none;
}

.detail-title {
    font-family: var(--font-titles);
    font-size: clamp(2.85rem, 6.45vw, 4.5rem);
    color: var(--navy-heading);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.05;
    margin: 0.5rem 0;
    word-break: break-word;
}

.detail-image-container+.eyebrow-label,
.detail-panel>.eyebrow-label:first-of-type {
    margin-bottom: 0.3rem;
}

.detail-meta {
    font-size: 0.8rem;
    color: var(--glacier);
    display: flex;
    gap: 0.7rem 1.35rem;
    flex-wrap: wrap;
    margin-bottom: 1.35rem;
    font-family: var(--font-mono);
    font-weight: 600;
}

.detail-tags {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.tag-chip {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(31, 127, 209, 0.15);
    color: var(--glacier);
    padding: 3px 9px;
    border: 1px solid rgba(31, 127, 209, 0.3);
}

.detail-desc {
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1.75;
    padding-left: 1.35rem;
    border-left: 3px solid var(--glacier);
    margin-bottom: 2.75rem;
    word-break: break-word;
}

.block-subhead {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--glacier);
    padding-bottom: 0.65rem;
    margin-bottom: 1.1rem;
}

.block-subhead svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.ingredient-row {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.9rem 0;
    border-bottom: 1px dashed var(--border-subtle);
    font-size: 0.97rem;
}

.ingredient-row:last-child {
    border-bottom: none;
}

.ingredient-qty {
    font-family: var(--font-mono);
    color: var(--glacier);
    font-weight: 700;
    white-space: nowrap;
}

.ingredient-name {
    flex: 1;
    color: var(--navy-heading);
    font-weight: 500;
}

.ingredient-note {
    color: var(--text-faint);
    font-size: 0.85rem;
    font-style: italic;
}

.step-row {
    display: flex;
    gap: 1.1rem;
    padding: 1.15rem 0;
    border-bottom: 1px dashed var(--border-subtle);
    font-size: 0.96rem;
    line-height: 1.6;
    color: var(--ice-white);
}

.step-row:last-child {
    border-bottom: none;
}

.step-num {
    font-family: var(--font-stencil);
    color: var(--glacier);
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 24px;
}

.step-content {
    flex: 1;
}

.step-title-text {
    font-weight: 700;
    color: var(--navy-heading);
    margin-bottom: 0.35rem;
}

.step-desc-text {
    font-size: 0.89rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.tips-panel {
    margin-top: 2.5rem;
    padding: 1.5rem 1.65rem;
    background: rgba(31, 127, 209, 0.06);
    border-left: 3px solid var(--glacier);
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--glacier);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.tips-panel p {
    color: var(--text-dim);
    font-size: 0.92rem;
    line-height: 1.6;
    white-space: pre-line;
}

.detail-actions {
    display: flex;
    gap: 0.85rem;
    margin-top: 2.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

/* ============ FORM VIEW ============ */
.form-panel {
    background: linear-gradient(135deg, var(--surface-card-a) 0%, var(--surface-card-b) 100%);
    border: 1px solid var(--border);
    padding: clamp(1.75rem, 4.5vw, 2.75rem);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.15rem 1.5rem;
}

.form-grid .field.full {
    grid-column: 1 / -1;
}

.dyn-row {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
    align-items: flex-start;
    flex-wrap: wrap;
    background: rgba(31, 127, 209, 0.04);
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-subtle);
}

.dyn-row input[type=text] {
    flex: 2;
    min-width: 120px;
}

.dyn-row input[type=number] {
    flex: 1;
    min-width: 70px;
}

.dyn-row .unit-input {
    flex: 1;
    min-width: 75px;
}

.dyn-row .note-input {
    flex: 2;
    min-width: 120px;
}

.dyn-row .step-input {
    flex: 2;
    min-width: 180px;
}

.dyn-row .step-desc-input {
    width: 100%;
    min-height: 65px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.dyn-row .checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
    font-weight: 700;
    padding-top: 0.6rem;
}

.form-section {
    margin: 2.75rem 0 1.25rem;
}

.form-actions {
    display: flex;
    gap: 0.85rem;
    margin-top: 2.25rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}

/* ============ KITCHEN MODE HUD ============ */
#kitchen-view {
    position: fixed;
    inset: 0;
    background: #eef3f8;
    color: #14243a;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 1rem clamp(0.75rem, 3vw, 2rem);
    overflow: hidden;
}

#kitchen-view.hidden {
    display: none;
}

.kitchen-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.85rem;
    flex-shrink: 0;
    gap: 0.5rem;
}

.kitchen-title {
    font-family: var(--font-titles);
    font-size: clamp(2.6rem, 5vw, 3.7rem);
    text-transform: uppercase;
    color: var(--navy-heading);
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.kitchen-layout-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}

.kitchen-sidebar {
    background: #ffffff;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    min-height: 0;
    box-shadow: 0 10px 25px rgba(20, 36, 58, 0.05);
}

.kitchen-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 0.65rem;
    flex-shrink: 0;
}

.kitchen-ing-list {
    overflow-y: auto;
    flex: 1;
    padding-right: 0.25rem;
}

.kitchen-ing-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.35rem;
    border-bottom: 1px dashed var(--border-subtle);
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.kitchen-ing-row:hover {
    background: rgba(31, 127, 209, 0.04);
}

.kitchen-ing-row.checked {
    opacity: 0.4;
    text-decoration: line-through;
}

.kitchen-ing-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--glacier);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
    color: transparent;
    background: #ffffff;
}

.kitchen-ing-row.checked .kitchen-ing-checkbox {
    background: var(--glacier);
    color: #ffffff;
}

.kitchen-ing-qty {
    font-family: var(--font-mono);
    color: var(--glacier);
    font-weight: 700;
    font-size: 0.85rem;
}

/* Taller, scrollable recipe notes in kitchen mode */
.kitchen-note-box {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    color: var(--text-dim);
    max-height: 160px;
    min-height: 60px;
    overflow-y: auto;
    line-height: 1.45;
    background: rgba(31, 127, 209, 0.03);
    padding: 0.65rem;
    border: 1px solid var(--border-subtle);
}

.kitchen-main {
    background: #ffffff;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem clamp(1rem, 2.5vw, 2.25rem);
    min-height: 0;
    box-shadow: 0 10px 25px rgba(20, 36, 58, 0.05);
    position: relative;
}

.kitchen-step-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.75rem;
    flex-shrink: 0;
}

.kitchen-step-counter {
    font-family: var(--font-stencil);
    color: var(--glacier);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.kitchen-step-progress-track {
    width: 90px;
    height: 5px;
    background: var(--border-subtle);
    overflow: hidden;
    flex-shrink: 0;
}

.kitchen-step-progress-fill {
    height: 100%;
    background: var(--glacier);
    transition: width 0.25s ease;
}

/* Step body: number badge + copy + timer sit side by side so the column
   reads as a composed layout rather than one block floating in empty space. */
.kitchen-step-body {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: clamp(1.25rem, 3vw, 2.25rem);
    padding: clamp(1.5rem, 4vh, 2.75rem) 0;
    overflow-y: auto;
    min-height: 0;
}

.kitchen-step-number-badge {
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    background: rgba(31, 127, 209, 0.06);
    border: 1px solid var(--glacier);
    color: var(--glacier);
    font-family: var(--font-titles);
    font-size: 2.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

.kitchen-step-number-badge span {
    display: block;
    line-height: 1;
}

.kitchen-step-copy {
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}

.kitchen-step-text {
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    line-height: 1.28;
    color: var(--navy-heading);
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.kitchen-step-desc {
    font-size: clamp(0.9rem, 1.4vw, 1.05rem);
    line-height: 1.6;
    color: var(--text-dim);
    max-width: 620px;
}

.kitchen-timer-card {
    flex-shrink: 0;
    width: 220px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 1.1rem 1.25rem 1.25rem;
    background: rgba(31, 127, 209, 0.05);
    border: 1px solid var(--border);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    position: relative;
}

.kitchen-timer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--glacier);
}

.kitchen-timer-card.is-done::before {
    background: var(--alpine-red);
}

.kitchen-timer-card.is-done {
    background: rgba(255, 59, 48, 0.06);
}

.kitchen-timer-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--glacier);
}

.kitchen-timer-label svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.kitchen-timer-display {
    font-family: var(--font-mono);
    font-size: clamp(2.1rem, 3.4vw, 2.6rem);
    font-weight: 700;
    color: var(--navy-heading);
    letter-spacing: 0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.kitchen-timer-card.is-done .kitchen-timer-display {
    color: var(--alpine-red);
}

.kitchen-timer-bar-track {
    width: 100%;
    height: 5px;
    background: var(--border-subtle);
    overflow: hidden;
}

.kitchen-timer-bar-fill {
    height: 100%;
    background: var(--glacier);
    transition: width 1s linear;
}

.kitchen-timer-card.is-done .kitchen-timer-bar-fill {
    background: var(--alpine-red);
}

.kitchen-timer-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.15rem;
}

.kitchen-timer-controls .btn {
    flex: 1;
    padding: 0.55rem 0.5rem;
    font-size: 0.68rem;
}

.kitchen-nav {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

@media (max-width: 720px) {
    .kitchen-step-body {
        flex-direction: column;
        gap: 1.25rem;
    }

    .kitchen-step-number-badge {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
    }

    .kitchen-timer-card {
        width: 100%;
    }
}

.kitchen-nav .btn {
    flex: 1;
    padding: 0.9rem;
    font-size: 0.85rem;
}

/* ============ FOOTER ============ */
footer#siteFooter {
    position: relative;
    background: #042330;
    color: rgba(255, 255, 255, 0.75);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem clamp(1rem, 3vw, 2.5rem);
    position: relative;
    z-index: 2;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: rgba(226, 232, 240, 0.65);
}

.footer-bottom a {
    color: var(--glacier);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--glacier-hover);
}

.hidden {
    display: none !important;
}

.speckled {
    filter: url(#distress-speckles);
}

/* ============ MOBILE RESPONSIVE FIXES ============ */
@media (max-width: 860px) {
    .kitchen-layout-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 200px 1fr;
    }
}

@media (max-width: 680px) {
    .recipe-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .section-head-browse {
        align-items: flex-start;
    }

    .section-head-browse button {
        width: 100%;
    }
}

@media (max-width: 540px) {
    .brand-text .brand-role {
        display: none;
    }

    .header-actions .btn {
        padding: 0.45rem 0.55rem;
        font-size: 0.7rem;
    }

    .header-actions .btn span.btn-label-long {
        display: none;
    }

    .dyn-row {
        flex-direction: column;
    }

    .dyn-row input,
    .dyn-row .qty-stepper {
        width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-sep {
        display: none;
    }
}