@import url('https://fonts.googleapis.com/css2?family=DynaPuff:wght@400..700&display=swap');

:root {
    --col-header:     #3b2314;
    --col-nav:        #7a3b1e;
    --col-nav-hover:  #a04e28;
    --col-accent:     #c0623a;
    --col-main-bg:    #fdf3e7;
    --col-card-bg:    #f5e3cc;
    --col-text:       #2e1a0e;
    --col-border:     #222222;
    --col-footer-bg:  rgba(255, 255, 255, 0.9);
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Orbitron", sans-serif;
}

header {
    background-color: var(--col-header);
    color: white;
    padding: 0 20px;
    height: 84px;
    display: flex;
    align-items: center;
    gap: 16px;
}

header img {
    height: 60px;
    width: auto;
    flex-shrink: 0;
}

header h1 {
    flex: 1;
    text-align: center;
    font-size: clamp(14px, 4vw, 32px);
    color: white;
}

nav {
    background-color: var(--col-nav);
    align-self: stretch;
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    gap: 12px;
    padding: 0 20px;
    align-items: center;
    list-style: none;
    height: 100%;
}

nav ul li {
    list-style: none;
    white-space: nowrap;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-size: clamp(10px, 1.2vw, 14px);
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ffd9b3;
}

#active {
    text-decoration: underline;
    text-underline-offset: 4px;
    color: white;
    font-size: clamp(10px, 1.2vw, 14px);
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    color: var(--col-text);
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--col-text);
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1rem;
    color: var(--col-accent);
    margin: 0.75rem 0 0.25rem;
}

main {
    background-color: var(--col-main-bg);
    min-height: calc(100vh - 84px - 30px);
    padding: 24px 24px 60px;
    color: var(--col-text);
}

main p {
    font-family: "Quantico", sans-serif;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

/* Sections stack vertically — heading on top, content below */
main section:not(.with_image) {
    display: block;
    margin-bottom: 2.5rem;
}

main section:not(.with_image) figure {
    display: block;
    width: 280px;
    margin: 0 0 1rem 0;
}

main section:not(.with_image) figure img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 14px;
    border: 3px solid var(--col-border);
    display: block;
}

/* Top-level figure (outside sections) */
main > figure img {
    width: 100%;
    max-width: 560px;
    height: 280px;
    object-fit: cover;
    border-radius: 14px;
    border: 3px solid var(--col-border);
    display: block;
    margin: 1rem 0 0.5rem;
}

.with_image {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

main section.with_image figure {
    flex: 1 1 calc(25% - 15px);
    min-width: 140px;
    width: auto;
}

figcaption {
    text-align: center;
    margin-top: 0.5rem;
    font-family: "Quantico", sans-serif;
    font-size: 0.9rem;
    color: var(--col-text);
}

.link_to_recipe {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
    border: 3px solid white;
    display: block;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.link_to_recipe:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.info {
    background-color: var(--col-card-bg);
    border-left: 5px solid var(--col-accent);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

section ol {
    list-style: none;
    padding: 0;
    counter-reset: step-counter;
}

section ol li {
    position: relative;
    padding: 1rem 1rem 1rem 3.5rem;
    margin-bottom: 1rem;
    background-color: var(--col-card-bg);
    border-left: 5px solid var(--col-accent);
    border-radius: 8px;
    counter-increment: step-counter;
}

section ol li::before {
    content: counter(step-counter);
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--col-accent);
    color: white;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
}

main ul {
    margin-left: 1.5rem;
    font-family: "Quantico", sans-serif;
    line-height: 1.8;
}

pre {
    background-color: var(--col-card-bg);
    border: 1px solid var(--col-border);
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.9rem;
    overflow-x: auto;
    margin: 0.75rem 0;
    font-family: monospace;
}

.qa-table {
    width: 92%;
    margin: 20px auto;
    border-collapse: collapse;
    border: 2px solid var(--col-border);
    border-radius: 8px;
    overflow: hidden;
}

.qa-table th {
    background-color: var(--col-nav);
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.95rem;
}

.qa-table td {
    background-color: var(--col-card-bg);
    padding: 14px 16px;
    vertical-align: top;
    border-bottom: 2px solid var(--col-border);
    font-family: "Quantico", sans-serif;
    color: var(--col-text);
}

.qa-table h3 {
    color: var(--col-accent);
    font-size: 1rem;
}

.qa-table h4 {
    color: var(--col-nav);
    margin-top: 10px;
}

.qa-table ul {
    margin-left: 20px;
}

form {
    max-width: 720px;
}

fieldset {
    border: 2px solid var(--col-border);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    background-color: var(--col-card-bg);
}

legend {
    font-weight: bold;
    color: var(--col-accent);
    padding: 0 0.5rem;
    font-size: 1rem;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

label {
    font-family: "Quantico", sans-serif;
    font-size: 0.95rem;
    color: var(--col-text);
}

input[type="text"],
input[type="date"],
textarea,
select {
    padding: 7px 11px;
    border: 2px solid var(--col-border);
    border-radius: 6px;
    font-family: "Quantico", sans-serif;
    background-color: white;
    color: var(--col-text);
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--col-accent);
}

button {
    background-color: var(--col-accent);
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 7px;
    cursor: pointer;
    font-family: "Orbitron", sans-serif;
    font-size: 0.8rem;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 0.5rem;
}

button:hover {
    background-color: var(--col-nav);
    transform: translateY(-1px);
}

.print-btn {
    display: block;
    margin-top: 1.5rem;
}

#march {
    border-collapse: collapse;
    margin: 1rem 0;
}

#march th,
#march td {
    border: 2px solid var(--col-text);
    padding: 4px;
    width: 70px;
    height: 32px;
}

#march th {
    background-color: var(--col-nav);
    color: white;
    text-align: center;
}

#march td {
    text-align: right;
    transition: background-color 0.3s, color 0.3s;
}

#march td:not(.past):hover {
    background-color: var(--col-accent);
    color: white;
}

.past {
    opacity: 0.35;
}

#merge_cells {
    border-collapse: collapse;
    margin: 1rem 0;
}

#merge_cells td {
    border: 4px solid var(--col-text);
    text-align: center;
    padding: 20px;
    font-size: 30px;
}

footer {
    background-color: var(--col-footer-bg);
    height: 30px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    line-height: 30px;
    color: var(--col-text);
    border-top: 1px solid var(--col-border);
    font-family: "Quantico", sans-serif;
    font-size: 0.85rem;
}