* {
    box-sizing: border-box;
}

:root {
    --text: #000000;
    --page-bg: #ffffff;
    --header-bg: #ffffff;
    --peach: #f2c7b2;
    --peach-light: #fff3ec;
    --peach-border: #e7b49d;
    --peach-darker: #d8926f;
    --green: #4f8a57;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--page-bg);
    color: var(--text);
    font-family: "Inter", Helvetica, Arial, sans-serif;
    line-height: 1.45;
}

a {
    color: inherit;
}

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

.hidden {
    display: none !important;
}

/* HEADER */

.tofu-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 82px;
    z-index: 100;
    background: var(--header-bg);
    border-bottom: 2px dotted #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
}

.tofu-logo {
    font-family: "Inter", Helvetica, Arial, sans-serif;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    font-weight: 800;
}

.tofu-logo span {
    font-weight: 700;
}

/* MENU */

.tofu-menu {
    position: relative;
    z-index: 20;
    width: 100%;
    padding-top: 112px;
    min-height: 100vh;
}

.tofu-menu-inner {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
    min-height: calc(100vh - 112px);
    display: flex;
    flex-direction: column;
    text-align: center;
}

.tofu-menu-main {
    width: 100%;
}

.tofu-menu-title {
    font-family: "Inter", Helvetica, Arial, sans-serif;
    font-size: 1.2rem;
    line-height: 1.2;
    margin: 0 0 1.2rem 0;
}

.tofu-menu-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
}

.tofu-menu-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    text-decoration: none;
    text-align: center;
}

.tofu-menu-link:hover,
.tofu-menu-link.active {
    opacity: 0.65;
}

.tofu-menu-link-title {
    font-family: "Inter", Helvetica, Arial, sans-serif;
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 500;
}

.tofu-menu-tags {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.tofu-menu-tag {
    display: inline-block;
    padding: 0.08rem 0.36rem 0.1rem;
    border: 1px solid var(--peach-border);
    background: #fff;
    color: #000;
    font-family: "Inter", Helvetica, Arial, sans-serif;
    font-size: 0.78rem;
    line-height: 1.1;
    white-space: nowrap;
}

.tofu-menu-tag.vegan {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.tofu-menu-footer {
    margin-top: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
    text-align: center;
}

.tofu-menu-home {
    font-family: "Inter", Helvetica, Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.tofu-menu-section {
    margin-bottom: 1.6rem;
}

.tofu-menu-section {
    margin-bottom: 1.8rem;
}

.tofu-menu-section-title {
    font-family: "Inter", Helvetica, Arial, sans-serif;
    font-size: 1.2rem;
    line-height: 1.2;
    margin: 0 0 0.7rem 0;
}

.tofu-menu-section-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
}

/* CONTENT */

.tofu-content {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 112px;
    padding-bottom: 5rem;
    position: relative;
    z-index: 10;
}

.recipe-page {
    width: 100%;
}

.recipe-title {
    font-family: "Inter", Helvetica, Arial, sans-serif;
    font-size: 2.2rem;
    line-height: 1.02;
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.recipe-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
}

.recipe-tag {
    display: inline-block;
    padding: 0.08rem 0.38rem 0.12rem;
    border: 1px solid var(--peach-border);
    background: #fff;
    color: #000;
    font-family: "Inter", Helvetica, Arial, sans-serif;
    font-size: 0.84rem;
    line-height: 1.1;
}

.recipe-tag.vegan {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

.recipe-image {
    width: 100%;
    margin: 0 0 1.4rem 0;
}

.recipe-body {
    font-family: "Inter", Helvetica, Arial, sans-serif;
    font-size: 1.08rem;
}

.recipe-body h1,
.recipe-body h2,
.recipe-body h3,
.recipe-body h4 {
    font-family: "Inter", Helvetica, Arial, sans-serif;
    line-height: 1.08;
    margin: 1.4rem 0 0.7rem 0;
    font-weight: 700;
}

.recipe-body h1 {
    font-size: 2rem;
}

.recipe-body h2 {
    font-size: 1.7rem;
}

.recipe-body h3 {
    font-size: 1.35rem;
}

.recipe-body h4 {
    font-size: 1.15rem;
}

.recipe-body p {
    margin: 0 0 1rem 0;
}

.recipe-body ul,
.recipe-body ol {
    margin: 1rem 0 1.2rem 0;
    padding-left: 1.3rem;
}

.recipe-body li {
    margin-bottom: 0.8rem;
}

.recipe-body blockquote {
    margin: 0 0 0.5rem 0;
    padding: 0 0 0 0.8rem;
    border-left: 2px solid #000;
    white-space: pre-line;
}

.recipe-body blockquote p {
    margin: 0;
    line-height: 1.25;
}

.recipe-body p img,
.recipe-body > img {
    margin: 1rem 0 1.2rem 0;
}

/* INLINE TIMER LINKS */

.timer-link {
    display: inline;
    text-decoration: underline;
    cursor: pointer;
}

.timer-link.running {
    font-weight: bold;
}

/* TIMER SCREEN */

.timer-screen {
    position: fixed;
    inset: 82px 0 0 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.timer-bg-fill {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        #ffffff var(--timer-progress, 0%),
        var(--peach) var(--timer-progress, 0%),
        var(--peach) 100%
    );
}

.timer-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.02em;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
}

.timer-remaining {
    font-family: "Inter", serif;
    font-weight: 800;
    font-size: clamp(6.5rem, 24vw, 15rem);
    line-height: 0.72;
    color: var(--peach-darker);
    letter-spacing: -0.07em;
    margin: 0;
    padding: 0;
    user-select: none;
}

@media (max-width: 640px) {
    .tofu-header {
        height: 72px;
    }

    .tofu-logo {
        font-size: 1.7rem;
    }

    .tofu-content,
    .tofu-menu {
        padding-top: 98px;
    }

    .tofu-menu-inner {
        min-height: calc(100vh - 98px);
    }

    .tofu-menu-link-title,
    .recipe-title {
        font-size: 1.75rem;
    }

    .timer-screen {
        inset: 72px 0 0 0;
    }

    .timer-remaining {
        font-size: clamp(6rem, 28vw, 10rem);
        line-height: 0.72;
    }
}
