/* Kitchen-tool and guide pages (/de/backform-umrechnen, /de/rezepte-sammeln-app, …).
   Layered on top of styles.css (.simple-page, .faq-item, .btn-store). Kept in
   its own file so these pages can grow without touching the home pages'
   stylesheet, which several branches edit at once. */

.tool-page {
    padding: 136px 0 80px;
}

.tool-page .container {
    max-width: 880px;
}

.tool-page h1 {
    margin-bottom: 12px;
}

.tool-page h3 {
    font-size: 20px;
    margin: 28px 0 8px;
}

.breadcrumb {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.simple-page .breadcrumb a {
    color: var(--text-muted);
}

.tool-lead {
    font-size: 18px;
}

/* ---------- Calculator ---------- */

.calc {
    background: var(--bg-card);
    border: 1px solid var(--outline-soft);
    border-radius: 20px;
    padding: 28px;
    margin: 28px 0 8px;
}

.calc-forms {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: start;
}

.calc-arrow {
    align-self: center;
    color: var(--text-muted);
    font-size: 24px;
    line-height: 1;
}

/* .dims and .presets set display:flex, which would otherwise beat the hidden attribute. */
.calc [hidden] {
    display: none;
}

.calc fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.calc legend,
.calc-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.shape-toggle {
    display: inline-flex;
    background: var(--bg-dark);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 14px;
}

.shape-toggle label {
    position: relative;
}

.shape-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.shape-toggle span {
    display: block;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
}

.shape-toggle input:checked + span {
    background: var(--outline);
    color: var(--text-main);
}

.shape-toggle input:focus-visible + span {
    outline: 2px solid var(--accent);
}

.dims {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 16px;
}

.dims input,
.ingredients textarea {
    background: var(--bg-dark);
    border: 1px solid var(--outline);
    border-radius: 10px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
}

.dims input {
    width: 88px;
    font-size: 20px;
    font-weight: 500;
    padding: 9px 12px;
    font-variant-numeric: tabular-nums;
}

.dims input:focus,
.ingredients textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.presets button,
.copy-btn {
    background: transparent;
    border: 1px solid var(--outline);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 5px 11px;
    font: 500 13px 'Inter', sans-serif;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.presets button:hover,
.presets button[aria-pressed="true"],
.copy-btn:hover {
    border-color: var(--accent);
    color: var(--text-main);
}

.calc-result {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--outline);
}

.simple-page .factor {
    font-family: 'Literata', 'Times New Roman', serif;
    font-size: 56px;
    line-height: 1;
    color: var(--text-main);
    margin: 0 0 10px;
    font-variant-numeric: tabular-nums;
}

.simple-page .factor-text {
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.simple-page .factor-detail,
.simple-page .calc-hint {
    font-size: 15px;
    margin-bottom: 0;
}

.calc-hint {
    margin-top: 12px;
}

.ingredients {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--outline);
}

.ingredients textarea {
    width: 100%;
    min-height: 140px;
    font-size: 15px;
    line-height: 1.6;
    padding: 12px 14px;
    resize: vertical;
}

.simple-page .scaled-list {
    list-style: none;
    margin: 16px 0 12px;
    padding: 0;
}

.simple-page .scaled-list li {
    margin: 0;
    padding: 7px 0;
    border-bottom: 1px solid var(--outline-soft);
    color: var(--text-main);
    font-size: 16px;
}

.scaled-list .qty {
    font-weight: 600;
}

.scaled-list .note,
.simple-page .scaled-list li.unchanged {
    color: var(--text-muted);
}

.scaled-list .note {
    font-size: 14px;
}

.simple-page .scaled-note {
    font-size: 14px;
    margin: 12px 0 0;
}

/* ---------- Tables ---------- */

.tool-table-wrap {
    overflow-x: auto;
    margin: 16px 0 12px;
}

.tool-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.tool-table caption {
    caption-side: bottom;
    text-align: left;
    font-size: 14px;
    color: var(--text-muted);
    padding-top: 10px;
}

.tool-table th,
.tool-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--outline);
    text-align: center;
    white-space: nowrap;
}

.tool-table thead th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
}

.tool-table tbody th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 600;
}

.tool-table td {
    color: var(--text-main);
}

.tool-table td.same {
    color: var(--text-muted);
}

/* ---------- Call to action, sources ---------- */

.tool-cta {
    margin-top: 56px;
    padding: 32px;
    background: var(--bg-card);
    border-radius: 20px;
    text-align: center;
}

.tool-cta h2 {
    margin-top: 0;
}

.tool-cta .app-buttons {
    margin-top: 24px;
}

/* .simple-page a colours every link accent; store buttons keep their own look. */
.simple-page .tool-cta a.btn-store {
    color: var(--text-main);
    border-bottom: 1px solid var(--outline-soft);
}

.simple-page .sources li,
.simple-page .tool-meta {
    font-size: 14px;
}

.simple-page .tool-meta {
    margin-top: 40px;
}

/* ---------- Guide pages ---------- */

.guide-hero {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 48px;
    align-items: center;
    margin-bottom: 24px;
}

.simple-page .guide-answer {
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-main);
}

.guide-hero .app-buttons {
    justify-content: flex-start;
    gap: 16px;
    margin-top: 24px;
}

.simple-page .guide-hero a.btn-store {
    color: var(--text-main);
    border-bottom: 1px solid var(--outline-soft);
}

.guide-shot {
    margin: 0;
    text-align: center;
}

.guide-shot img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 25px rgba(0, 0, 0, 0.5));
}

.guide-shot figcaption {
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-muted);
    margin-top: 12px;
}

.shot-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 32px 0 8px;
}

.simple-page .criteria,
.simple-page .steps {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.simple-page .criteria > li {
    margin: 0;
    padding: 20px 0;
    border-top: 1px solid var(--outline);
}

.simple-page .criteria > li:last-child {
    border-bottom: 1px solid var(--outline);
}

.tool-page .criteria h3 {
    margin: 0 0 6px;
}

.simple-page .criteria p {
    margin-bottom: 6px;
}

.simple-page .criteria .meally {
    color: var(--text-main);
    margin-bottom: 0;
}

.criteria .meally strong {
    color: var(--accent);
    font-weight: 600;
}

.simple-page .steps {
    counter-reset: step;
}

.simple-page .steps > li {
    counter-increment: step;
    position: relative;
    padding-left: 44px;
    margin-bottom: 18px;
}

.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 1px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--outline);
    color: var(--text-main);
    font: 600 14px/26px 'Inter', sans-serif;
    text-align: center;
}

.steps strong {
    color: var(--text-main);
    font-weight: 600;
}

.tool-table.methods td {
    text-align: left;
    white-space: normal;
    color: var(--text-muted);
    vertical-align: top;
}

.tool-table.methods tbody th {
    vertical-align: top;
    color: var(--text-main);
}

@media (max-width: 640px) {
    .tool-page {
        padding: 104px 0 56px;
    }

    .guide-hero {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .guide-hero .guide-shot img {
        width: 220px;
    }

    .guide-hero .app-buttons .btn-store {
        min-width: 0;
        flex: 1;
    }

    .shot-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* The three-column comparison is unreadable at phone width: stack each row. */
    .tool-table.methods thead {
        display: none;
    }

    .tool-table.methods,
    .tool-table.methods tbody,
    .tool-table.methods tr,
    .tool-table.methods th,
    .tool-table.methods td {
        display: block;
        width: 100%;
    }

    .tool-table.methods tr {
        padding: 14px 0;
        border-bottom: 1px solid var(--outline);
    }

    .tool-table.methods th,
    .tool-table.methods td {
        border: 0;
        padding: 3px 0;
    }

    .tool-table.methods td::before {
        content: attr(data-label) ": ";
        color: var(--text-main);
        font-weight: 600;
    }

    .simple-page.tool-page h1 {
        font-size: 40px;
    }

    .calc {
        padding: 20px;
        border-radius: 16px;
    }

    .calc-forms {
        grid-template-columns: 1fr;
    }

    .calc-arrow {
        transform: rotate(90deg);
        justify-self: start;
        margin-left: 8px;
    }

    .simple-page .factor {
        font-size: 44px;
    }

    .tool-cta {
        padding: 24px 20px;
    }
}
