/* etybites — vintage commonplace book */

:root {
    --parchment:   #f0eadb;
    --parchment-2: #e8e0cc;
    --ink:         #2b2620;
    --ink-2:       #4a443a;
    --faded:       #847c6e;
    --stone:       #95A5A6;
    --stone-deep:  #6b7778;
    --rule:        #c8bea8;
    --serif:       'EB Garamond', 'Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
    --display:     'Cormorant SC', 'Cormorant', serif;
    --hand:        'EB Garamond', Georgia, serif;
}

html {
    box-sizing: border-box;
    background: var(--parchment);
}
*, *::before, *::after { box-sizing: inherit; }

body {
    margin: 0;
    padding: 0;
    background: var(--parchment);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 19px;
    line-height: 1.75;
    font-feature-settings: 'liga' 1, 'dlig' 1, 'kern' 1, 'onum' 1;
}

/* Subtle paper texture via overlapping radial gradients */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 600px 400px at 20% 30%, rgba(149, 165, 166, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse 400px 300px at 80% 70%, rgba(43, 38, 32, 0.03) 0%, transparent 60%),
        radial-gradient(ellipse 500px 300px at 50% 0%, rgba(132, 124, 110, 0.05) 0%, transparent 70%);
    z-index: 0;
}

.frame {
    max-width: 620px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
    position: relative;
    z-index: 1;
}

/* Header */
.head {
    text-align: center;
    margin-bottom: 3rem;
}
.head .titling {
    font-family: var(--display);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.32em;
    color: var(--stone-deep);
    text-transform: uppercase;
    margin: 0 0 1.2rem;
}
.head .name {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 3rem;
    letter-spacing: 0.01em;
    line-height: 1;
    color: var(--ink);
    margin: 0 0 0.4rem;
    font-style: italic;
}
.head .name a {
    color: inherit;
    text-decoration: none;
}
.head .sub {
    font-family: var(--display);
    font-weight: 400;
    font-size: 0.82rem;
    letter-spacing: 0.22em;
    color: var(--faded);
    text-transform: uppercase;
    margin: 0;
}

nav.crumbs {
    text-align: center;
    margin-top: 1.6rem;
    font-family: var(--display);
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--faded);
}
nav.crumbs a {
    color: var(--ink-2);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    margin: 0 0.55rem;
    padding-bottom: 2px;
    transition: border-color 0.15s, color 0.15s;
}
nav.crumbs a:hover, nav.crumbs a.here {
    color: var(--stone-deep);
    border-bottom-color: var(--stone);
}
nav.crumbs .pip { color: var(--rule); }

/* Fleuron ornament dividers */
.fleuron {
    text-align: center;
    margin: 2.6rem 0 2rem;
    color: var(--stone);
    font-size: 1.4rem;
    letter-spacing: 0.4em;
    user-select: none;
}
.fleuron::before { content: '❦ ❦ ❦'; letter-spacing: 0.6em; }

.rule {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, var(--rule) 20%, var(--rule) 80%, transparent 100%);
    margin: 2.4rem 0;
}

/* Long-form prose */
.frame p {
    margin: 0 0 1.2rem;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}
.frame p:first-of-type::first-line {
    font-variant: small-caps;
    letter-spacing: 0.04em;
}

.opening::first-letter {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 3.6rem;
    line-height: 0.9;
    float: left;
    padding: 0.35rem 0.5rem 0 0;
    color: var(--stone-deep);
    font-style: italic;
}

h2 {
    font-family: var(--display);
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    text-align: center;
    color: var(--ink);
    margin: 2.6rem 0 1.4rem;
}
h2::before, h2::after {
    content: '·';
    color: var(--stone);
    margin: 0 0.8rem;
    font-size: 1.3em;
    vertical-align: 0.1em;
}

h3 {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    font-size: 1.3rem;
    margin: 1.8rem 0 0.7rem;
    color: var(--ink);
}

a {
    color: var(--stone-deep);
    text-decoration: none;
    border-bottom: 1px solid var(--stone);
    transition: color 0.15s, border-bottom-color 0.15s;
}
a:hover {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

em { font-style: italic; }
.italic { font-style: italic; }

/* Entry list (etymologies, episodes) */
.entries {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    counter-reset: entry;
}
.entries li {
    counter-increment: entry;
    padding: 1.1rem 0;
    border-bottom: 1px dashed var(--rule);
}
.entries li:last-child { border-bottom: 0; }
.entries .word {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    font-size: 1.3rem;
    color: var(--ink);
    display: block;
    margin-bottom: 0.25rem;
}
.entries .word::before {
    content: counter(entry, lower-roman) '.';
    font-style: normal;
    font-family: var(--display);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--stone);
    margin-right: 0.7rem;
    vertical-align: 0.1em;
    text-transform: uppercase;
}
.entries .gloss {
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--ink-2);
    margin: 0;
    text-align: left;
}
.entries .prov {
    font-family: var(--display);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--faded);
    margin-top: 0.4rem;
    display: block;
}

/* Side note (en passant marginalia rendered inline) */
.aside-note {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--ink-2);
    background: rgba(149, 165, 166, 0.07);
    border-left: 2px solid var(--stone);
    padding: 0.9rem 1.2rem;
    margin: 1.6rem 0;
    text-align: left;
}
.aside-note::before {
    content: '¶ ';
    color: var(--stone);
    font-style: normal;
}

/* Definition list — neat for terms / privacy lists */
dl.defs {
    margin: 1rem 0 1.5rem;
}
dl.defs dt {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    margin-top: 0.9rem;
    color: var(--ink);
}
dl.defs dd {
    margin: 0.1rem 0 0 0;
    color: var(--ink-2);
    text-align: justify;
    hyphens: auto;
}

ul.plain {
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.4rem;
}
ul.plain li {
    padding: 0.4rem 0 0.4rem 1.6rem;
    position: relative;
    text-align: left;
}
ul.plain li::before {
    content: '✦';
    color: var(--stone);
    position: absolute;
    left: 0.2rem;
    top: 0.4rem;
    font-size: 0.8rem;
}

/* Foot */
.foot {
    text-align: center;
    margin-top: 3.6rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--rule);
    font-family: var(--display);
    font-size: 0.76rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--faded);
}
.foot p { margin: 0.4rem 0; text-align: center; }
.foot a {
    color: var(--ink-2);
    border-bottom-color: var(--rule);
}

/* Effective date / small print */
.effective {
    font-family: var(--display);
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--faded);
    text-align: center;
    margin: -1rem 0 2.5rem;
}

@media (max-width: 540px) {
    .frame { padding: 2rem 1.4rem 4rem; }
    .head .name { font-size: 2.4rem; }
    body { font-size: 18px; }
    nav.crumbs a { margin: 0 0.35rem; display: inline-block; }
}
