.terms-shell {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding-bottom: clamp(4rem, 8vw, 7rem);
}

.terms-hero {
    max-width: 780px;
    margin: 0 auto;
    padding: clamp(4rem, 9vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem);
    text-align: center;
}

.terms-hero h1 {
    margin: 0.6rem 0 0;
    text-transform: uppercase;
}

.terms-hero p {
    max-width: 620px;
    margin: 1.4rem auto 0;
    color: rgba(36, 24, 17, 0.68);
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    line-height: 1.85;
}

.terms-updated {
    display: inline-block;
    margin-top: 1.4rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mocha);
    padding: 0.5rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
}

.terms-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
    border-top: 1px solid var(--line);
    padding-top: clamp(2.5rem, 5vw, 4rem);
}

.terms-toc {
    position: sticky;
    top: 140px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    padding: 1.3rem 1.4rem;
}

.terms-toc-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--mocha);
    margin-bottom: 0.9rem;
}

.terms-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.65rem;
    counter-reset: terms-toc-counter;
}

.terms-toc li {
    counter-increment: terms-toc-counter;
}

.terms-toc a {
    display: flex;
    gap: 0.55rem;
    font-size: 0.86rem;
    line-height: 1.4;
    color: rgba(36, 24, 17, 0.72);
    text-decoration: none;
}

.terms-toc a::before {
    content: counter(terms-toc-counter);
    flex: none;
    font-weight: 800;
    color: var(--latte);
}

.terms-toc a:hover {
    color: var(--coffee);
}

.terms-content {
    min-width: 0;
}

.terms-section {
    padding: 1.9rem 0;
    border-top: 1px solid var(--line);
    scroll-margin-top: 140px;
}

.terms-section:first-child {
    border-top: none;
    padding-top: 0;
}

.terms-section h2 {
    margin: 0 0 0.9rem;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    line-height: 1.2;
}

.terms-section p {
    margin: 0 0 1rem;
    color: rgba(36, 24, 17, 0.72);
    font-size: 0.98rem;
    line-height: 1.85;
}

.terms-section p:last-child {
    margin-bottom: 0;
}

.terms-section ul {
    margin: 0 0 1rem;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.5rem;
}

.terms-section li {
    color: rgba(36, 24, 17, 0.72);
    font-size: 0.98rem;
    line-height: 1.75;
}

.terms-section a {
    color: var(--mocha);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.terms-section a:hover {
    color: var(--ink);
}

.terms-placeholder {
    background: rgba(183, 159, 138, 0.28);
    color: var(--coffee);
    border-bottom: 1px dashed var(--mocha);
    padding: 0 0.3em;
    border-radius: 3px;
    font-weight: 700;
    cursor: help;
}

@media (max-width: 900px) {
    .terms-layout {
        grid-template-columns: 1fr;
    }

    .terms-toc {
        position: static;
    }
}
