/* Mouseion. Papyrus, ink, red ochre, Egyptian blue and gold.
   The page is a sheet of papyrus: two layers of fibres at right angles,
   as the strips of the pith were laid. No third-party assets. */
@import url(/assets/fonts.css);

:root {
  --papyrus: #efe3c2;
  --papyrus-deep: #e3d3a8;
  --papyrus-edge: #cdb77f;
  --ink: #2a2017;
  --ink-soft: #5b4a36;
  --ochre: #9c3b1b;
  --blue: #1f4c8f;          /* Egyptian blue */
  --gold: #a87b22;
  --rule: #c9b27a;
  --f-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --f-text: 'EB Garamond', Garamond, Georgia, serif;
  --f-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --measure: 40rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --papyrus: #1d1812; --papyrus-deep: #16120d; --papyrus-edge: #3a2f20;
    --ink: #eadcb8; --ink-soft: #b9a37c; --ochre: #d9774e; --blue: #7ea6e0; --gold: #d8ad55; --rule: #4a3c28;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--papyrus); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--papyrus);
  background-image:
    repeating-linear-gradient(90deg, transparent 0 6px, rgb(120 90 40 / .045) 6px 7px, transparent 7px 13px, rgb(120 90 40 / .03) 13px 15px),
    repeating-linear-gradient(0deg, transparent 0 9px, rgb(120 90 40 / .05) 9px 10px, transparent 10px 17px, rgb(255 255 255 / .05) 17px 19px),
    radial-gradient(120% 80% at 50% 0%, transparent 60%, rgb(120 90 40 / .10));
  font: 400 1.125rem/1.62 var(--f-text);
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  font-variant-numeric: oldstyle-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ochre); }
::selection { background: rgb(168 123 34 / .3); }

.shell { max-width: 68rem; margin: 0 auto; padding: 0 16px; }
.meander { display: block; width: 100%; height: 16px; background: var(--gold); -webkit-mask: url(/assets/meander.svg) repeat-x left center / 28px 16px; mask: url(/assets/meander.svg) repeat-x left center / 28px 16px; }
.umbel { width: 3.2rem; height: 2rem; color: var(--gold); display: block; margin: 2.2rem auto; }

/* Masthead */
.mast { padding: 1.4rem 0 0; }
.mast .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; }
.brand .eagle { width: 2.6rem; height: 2.6rem; color: var(--ochre); }
.brand b { font: 600 1.35rem/1 var(--f-display); letter-spacing: .12em; }
.brand small { display: block; font: italic 400 .85rem/1.2 var(--f-text); color: var(--ink-soft); letter-spacing: 0; }
.mast nav { display: flex; flex-wrap: wrap; gap: .6rem 1.1rem; font: 500 .8rem/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase; }
.mast nav a { color: var(--ink-soft); text-decoration: none; }
.mast nav a:hover { color: var(--ochre); }
.mast .meander { margin-top: 1.1rem; }

/* Hero */
.hero { text-align: center; padding: 3.5rem 0 2rem; }
.hero .eagle { width: min(16rem, 60vw); height: auto; color: var(--ochre); }
.hero h1 { font: 600 clamp(2.4rem, 1.4rem + 4vw, 4.2rem)/1.05 var(--f-display); letter-spacing: .16em; margin: 1.2rem 0 .4rem; }
.hero.compact { padding: 2.2rem 0 1.4rem; }
.hero.compact .eagle { width: min(9rem, 40vw); }
.hero .greek { font: italic 400 1.35rem/1.3 var(--f-text); color: var(--ink-soft); margin: 0; }
.epigraph { max-width: 34rem; margin: 1.6rem auto 0; font-style: italic; color: var(--ink-soft); }
.epigraph cite { display: block; font: 500 .75rem/1.4 var(--f-display); letter-spacing: .16em; text-transform: uppercase; font-style: normal; margin-top: .4rem; }

/* Headings and small caps labels */
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: .06em; line-height: 1.15; text-wrap: balance; }
h2 { font-size: 1.35rem; letter-spacing: .12em; text-transform: uppercase; margin: 2.6rem 0 1rem; }
.label { font: 500 .72rem/1.3 var(--f-display); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.muted { color: var(--ink-soft); }

/* Scroll cards: a rolled scroll with rods at both ends */
.scrolls { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.card {
  position: relative; padding: 1.3rem 1.4rem 1.2rem;
  background: linear-gradient(180deg, rgb(255 255 255 / .18), transparent 40%), var(--papyrus-deep);
  border-left: 7px solid var(--papyrus-edge); border-right: 7px solid var(--papyrus-edge);
  box-shadow: 0 1px 0 rgb(0 0 0 / .06), 0 10px 24px -18px rgb(60 40 10 / .6);
}
.card .thumb { display: block; margin: -1.3rem -1.4rem 1rem; border-bottom: 1px solid var(--rule); }
.thumb img, .featured-art img { display: block; width: 100%; height: auto; }
.card::before, .card::after { content: ''; position: absolute; top: -6px; bottom: -6px; width: 9px; background: var(--gold); border-radius: 5px; opacity: .85; }
.card::before { left: -8px; } .card::after { right: -8px; }
.card h3 { font-size: 1.12rem; margin: .35rem 0 .45rem; letter-spacing: .04em; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--ochre); }
.card p { margin: 0 0 .6rem; font-size: 1rem; }
.byline { font-style: italic; color: var(--ink-soft); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: .4rem 0 0; list-style: none; }
.tags a { font: 500 .78rem/1 var(--f-text); padding: .2rem .45rem; border: 1px solid var(--rule); border-radius: 2px; text-decoration: none; color: var(--blue); }
.genesis-mark { color: var(--ochre); }

/* Cartouche */
.cartouche { display: inline-block; padding: .08em .7em; border: 2px solid currentColor; border-radius: 999px; position: relative; }
.cartouche::after { content: ''; position: absolute; right: -9px; top: 15%; bottom: 15%; border-right: 2px solid currentColor; }

/* Scroll page */
.scroll-head { max-width: var(--measure); margin: 2.4rem auto 1.2rem; text-align: center; }
.scroll-head h1 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.8rem); margin: .5rem 0; }
.scroll-head .dedication { font-family: var(--f-text); font-size: 1.12rem; margin: 1rem auto .6rem; max-width: 34rem; }
.scroll-head .dedication i { font-style: italic; letter-spacing: .01em; }
.frame {
  position: relative; margin: 1.6rem auto; max-width: 62rem;
  border-left: 12px solid var(--papyrus-edge); border-right: 12px solid var(--papyrus-edge);
  background: var(--papyrus-deep); padding: 10px;
  box-shadow: 0 18px 40px -26px rgb(50 30 5 / .7);
}
.frame::before, .frame::after { content: ''; position: absolute; top: -10px; bottom: -10px; width: 14px; background: linear-gradient(90deg, #7a5a1c, var(--gold), #7a5a1c); border-radius: 7px; }
.frame::before { left: -18px; } .frame::after { right: -18px; }
.frame iframe { display: block; width: 100%; height: 80vh; min-height: 32rem; border: 0; background: #fff; }
.frame .fallback { text-align: center; font-size: .9rem; margin: .5rem 0 0; }

.sealed { max-width: 36rem; text-align: center; border: 2px solid var(--ochre); }

/* Provenance: the colophon of the scroll */
.provenance { max-width: var(--measure); margin: 2rem auto; }
.provenance dl { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: .45rem 1.2rem; margin: 0; }
.provenance dt { font: 500 .72rem/1.9 var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.provenance dd { margin: 0; overflow-wrap: anywhere; }
.hash { font: .82rem/1.5 var(--f-mono); color: var(--ink-soft); word-break: break-all; }
.ok { color: #3f6b2a; } .bad { color: var(--ochre); font-weight: 600; }
@media (prefers-color-scheme: dark) { .ok { color: #9ccf7c; } }
.evidence { list-style: none; padding: 0; margin: 0; }
.evidence li { padding: .6rem 0; border-top: 1px solid var(--rule); }

.provenance-list { display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr; gap: .4rem 1rem; }
.provenance-list dd { margin: 0; }
@media (max-width: 640px) { .provenance-list { grid-template-columns: 1fr; } }

.rules li { margin: .4rem 0; }
.tag { display: inline-block; font: 600 .68rem/1.4 var(--f-display); letter-spacing: .12em; padding: .05rem .4rem; border: 1px solid var(--gold); color: var(--gold); }
.tag-prio { color: var(--papyrus); background: var(--ochre); border-color: var(--ochre); }
.tag-user { color: var(--blue); border-color: var(--blue); }
.panel textarea, .panel select { width: 100%; font: .9rem/1.45 var(--f-mono); padding: .5rem .6rem; background: var(--papyrus); color: var(--ink); border: 1px solid var(--rule); }
.panel select { font-family: var(--f-text); }
.letter { max-width: 42rem; }
.check { display: flex !important; gap: .6rem; align-items: flex-start; text-transform: none !important; letter-spacing: 0 !important; font: 400 1rem/1.4 var(--f-text) !important; color: var(--ink) !important; }
.panel .check input { width: auto; flex: none; margin-top: .3rem; }
.button.small { padding: .45rem .7rem; font-size: .68rem; margin-top: .3rem; }
.button.secondary { background: transparent; color: var(--ochre); border: 1px solid var(--ochre); }

.text-scroll h2 { text-transform: none; letter-spacing: .05em; font-size: 1.6rem; margin-top: 2.2rem; }
.text-scroll h3 { font-size: 1.2rem; margin-top: 1.8rem; }
.text-scroll table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1rem 0; }
.text-scroll th, .text-scroll td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.text-scroll code { font: .88em var(--f-mono); background: var(--papyrus-deep); padding: .05em .3em; }
.text-scroll pre { background: var(--papyrus-deep); padding: .8rem 1rem; overflow-x: auto; }
.leave { text-align: center; }
.leave h1 { font-size: 1.6rem; overflow-wrap: anywhere; }

/* Chain */
table.chain { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: lining-nums tabular-nums; }
table.chain th { font: 500 .7rem/1.4 var(--f-display); letter-spacing: .14em; text-transform: uppercase; text-align: left; color: var(--gold); border-bottom: 2px solid var(--ink); padding: .4rem .5rem; }
table.chain td { border-bottom: 1px solid var(--rule); padding: .45rem .5rem; vertical-align: top; }
.table-wrap { overflow-x: auto; }

/* Prose pages */
.prose { max-width: var(--measure); margin: 0 auto; }
.prose p { margin: 0 0 1em; text-wrap: pretty; hyphens: auto; }

/* Forms (register / login) */
.panel { max-width: 30rem; margin: 2.5rem auto; padding: 1.6rem; background: var(--papyrus-deep); border: 1px solid var(--rule); }
.panel label { display: block; font: 500 .72rem/1.4 var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin: 1rem 0 .3rem; }
.panel input { width: 100%; font: inherit; padding: .5rem .6rem; background: var(--papyrus); color: var(--ink); border: 1px solid var(--rule); }
.button { display: inline-block; margin-top: 1.2rem; font: 600 .8rem/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase; padding: .8rem 1.2rem; color: var(--papyrus); background: var(--ochre); border: 0; cursor: pointer; }
.button:disabled { opacity: .5; cursor: default; }
.status { min-height: 1.5em; margin-top: .8rem; font-style: italic; }
.status.err { color: var(--ochre); }
.codes { font: .95rem/1.8 var(--f-mono); columns: 2; }

footer.foot { margin-top: 4rem; padding: 0 0 2.5rem; color: var(--ink-soft); font-size: .9rem; text-align: center; }
footer.foot .meander { margin-bottom: 1.4rem; }

@media (max-width: 640px) {
  .mast .row { flex-direction: column; align-items: flex-start; }
  .provenance dl { grid-template-columns: 1fr; }
  .frame { border-width: 0 6px; } .frame::before, .frame::after { width: 8px; }
  .frame::before { left: -10px; } .frame::after { right: -10px; }
}
@media print {
  body { background: #fff; }
  .mast nav, .frame iframe { display: none; }
}

/* The front page: one scroll shown in full, then the shelves, then (while they
   are nearly bare) an invitation. */
.featured { display: grid; gap: 2rem 2.6rem; align-items: center; margin: 1.6rem 0 0; }
@media (min-width: 860px) { .featured { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.featured-art { position: relative; display: block; margin: 0 18px; border: 1px solid var(--rule); box-shadow: 0 18px 36px -24px rgb(60 40 10 / .7); }
.featured-art::before, .featured-art::after { content: ''; position: absolute; top: -10px; bottom: -10px; width: 14px; background: linear-gradient(90deg, #7a5a1c, var(--gold), #7a5a1c); border-radius: 7px; }
.featured-art::before { left: -18px; } .featured-art::after { right: -18px; }
.featured-text h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); text-transform: none; letter-spacing: .04em; margin: .5rem 0 .8rem; }
.featured-text h2 a { color: var(--ink); text-decoration: none; }
.featured-text h2 a:hover { color: var(--ochre); }
.featured-text .summary { font-size: 1.15rem; margin: 0 0 .8rem; text-wrap: pretty; }
.featured-text .dedication { margin: 0 0 1rem; color: var(--ink-soft); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: 0 0 .4rem; font-size: 1rem; }
.facts dt { font: 500 .7rem/1.9 var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.featured .actions .button { margin-right: .5rem; }
.invite { max-width: var(--measure); margin: 3rem auto 1rem; padding: 1.6rem 1.8rem; text-align: center; border: 1px solid var(--rule); border-top: 3px double var(--gold); border-bottom: 3px double var(--gold); background: rgb(255 255 255 / .12); }
.invite h2 { text-transform: none; letter-spacing: .05em; margin: .4rem 0 .8rem; }
.invite p { margin: 0 0 1rem; text-wrap: pretty; }
.steps { text-align: left; margin: 0 auto; padding-left: 1.4rem; max-width: 32rem; }
.steps li { margin: .5rem 0; }
.chain-line { text-align: center; margin-top: 2rem; }
@media (prefers-color-scheme: dark) { .invite { background: rgb(0 0 0 / .12); } }
