:root {
  color-scheme: light;
  --paper: #f4efe8;
  --white: #fffcf7;
  --text: #212923;
  --muted: #545d54;
  --dark: #4b6353;
  --sage: #6b7f6e;
  --moss: #a7b8a7;
  --mist: #d9e1d9;
  --sand: #c9bdaf;
  --line: #ddd6cc;
  --shadow: 0 1px 2px #493b2b0d, 0 9px 24px #59483912;
  --sans: "Jost", "Segoe UI", system-ui, sans-serif;
  --display: var(--sans);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(ellipse at 12% 0, #fcf8f1 0, transparent 37rem), var(--paper); color: var(--text); font: 1rem/1.55 var(--sans); }
img { display: block; width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid #677c6b; outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { width: min(100% - 5rem, 78rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid #ddd6ccbc; background: #f9f5eecc; }
.nav { min-height: 5.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1.3rem; }
.nav nav { display: flex; align-items: center; gap: clamp(.8rem, 3vw, 2.7rem); }
.nav nav a { text-decoration: none; font-size: .94rem; font-weight: 600; white-space: nowrap; }
.nav nav a:hover, .text-link:hover { text-decoration-thickness: 2px; color: var(--dark); }
.brand { display: inline-flex; align-items: center; gap: .68rem; min-width: max-content; font-weight: 800; font-size: 1.3rem; letter-spacing: -.025em; text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; background: var(--dark); width: 2rem; height: 2rem; color: var(--white); border-radius: .7rem; font: 700 1.05rem var(--display); }
.hero { margin-top: clamp(1.35rem, 3.5vw, 3rem); display: grid; grid-template-columns: 1fr 1.05fr; min-height: clamp(25rem, 43vw, 36rem); overflow: hidden; border-radius: 1.8rem; background: linear-gradient(135deg, #f8f4ec, #e6e9df); color: var(--text); border: 1px solid #fff9; box-shadow: var(--shadow); }
.hero-copy { align-self: center; padding: clamp(1.8rem, 5vw, 4.8rem); padding-right: clamp(1.35rem, 3vw, 3rem); min-width: 0; }
.hero .eyebrow { color: var(--dark); }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; line-height: 1.08; letter-spacing: -.033em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.6rem, 5.7vw, 5.6rem); }
h2 { font-size: clamp(1.9rem, 3.2vw, 3.05rem); }
h3 { font-size: 1.26rem; line-height: 1.18; }
h4 { font-size: 1rem; }
p { margin-block: .65em; overflow-wrap: anywhere; }
.eyebrow { font-weight: 700; font-size: .85rem; line-height: 1.4; letter-spacing: .12em; color: var(--dark); margin: 0 0 1rem; }
.lede { font-size: clamp(1rem, 1.5vw, 1.2rem); max-width: 34rem; margin: 1.25rem 0 1.45rem; }
.hero .lede { color: var(--muted); }
.hero-media { position: relative; min-width: 0; display: grid; place-items: stretch; background: #b7c3b0; min-height: 15.5rem; }
.hero-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.book-art { position: relative; display: grid; place-items: center; isolation: isolate; min-height: 100%; overflow: hidden; background: radial-gradient(ellipse at 25% 10%, #d7dec7, transparent 67%), #a7b8a1; }
.book-cover { position: absolute; width: 35%; aspect-ratio: .76; padding: 7% 5%; transform: translate(-34%, -7%) rotate(-13deg); display: flex; flex-direction: column; justify-content: space-between; color: #e4f0b0; background: linear-gradient(130deg, #374d37, #1c3327 70%); border-radius: 3% 5% 4% 2%; box-shadow: .6rem 1.5rem 2.15rem #29372868, inset 5px 0 #ffffff17; }
.book-cover span { font-size: clamp(.48rem, .9vw, .75rem); letter-spacing: .18em; }
.book-cover b { font: 500 clamp(1.05rem, 3.35vw, 3.3rem)/.9 var(--display); }
.book-pages { position: absolute; transform: translate(38%, 23%) rotate(14deg); width: 40%; aspect-ratio: 1.34; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6%; padding: 6%; background: linear-gradient(90deg, #ede8d5 48%, #d0c9b7 50%, #fcf0de 52%); border: .22rem solid #374538; box-shadow: .45rem 1.2rem 1.7rem #2937286e; }
.book-pages i { background: linear-gradient(145deg, #776c5d, #a39177 55%, #454c40); }
.book-pages i:nth-child(2) { background: linear-gradient(144deg, #697b7a, #a2bbb4 51%, #444552); }
.book-pages i:nth-child(3) { background: linear-gradient(144deg, #b47c68, #535047); }
.book-pages i:nth-child(4) { background: linear-gradient(144deg, #9ea486, #58654d); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.8rem; padding: .6rem 1.15rem; border: 1px solid transparent; border-radius: 999px; font-size: 1rem; line-height: 1.3; font-weight: 700; text-decoration: none; text-align: center; white-space: normal; transition: background-color .16s ease, box-shadow .16s ease; }
.button.small { min-height: 2.45rem; padding: .5rem .85rem; font-size: .88rem; }
.button.accent, .button.dark { color: #fff; background: var(--dark); box-shadow: 0 3px 8px #344c3a26; }
.button.accent:hover, .button.dark:hover { background: #3e5546; }
.button.outlined { background: #fffaf080; border-color: #a9ada2; color: var(--text); }
.button.outlined:hover, .button.ghost:hover { background: var(--mist); }
.button.ghost { color: inherit; background: transparent; }
.button:disabled { opacity: .6; cursor: wait; }
.text-link { text-underline-offset: .24em; text-decoration-color: var(--moss); font-weight: 650; }
.section { margin-block: clamp(2.6rem, 6vw, 5.8rem); scroll-margin-top: 1.8rem; }
.section-heading { margin-bottom: 1.25rem; }
.section-heading p { margin-bottom: 0; }
.card { background: var(--white); border: 1px solid #fffcf5; border-radius: 1.5rem; box-shadow: var(--shadow); min-width: 0; }
.offer-grid, .profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.offer-link { display: block; text-decoration: none; padding: clamp(1.25rem, 3.5vw, 2.3rem); }
.offer-link:hover { border-color: var(--moss); }
.offer-link h3, .package h3 { font: 500 clamp(1.55rem, 3vw, 2.4rem)/1.08 var(--display); letter-spacing: -.04em; }
.offer-link p { color: var(--muted); }
.package { overflow: hidden; }
.package-copy { padding: clamp(1.25rem, 3.5vw, 2rem); }
.package-photo { aspect-ratio: 2; object-fit: cover; }
.price { white-space: nowrap; border-radius: 2rem; background: var(--mist); padding: .25rem .68rem; }
.included { border-top: 1px solid var(--line); margin-top: 1.15rem; padding-top: 1rem; }
.included p { color: var(--muted); line-height: 1.7; }
.split-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin: 2rem 0; }
.split-links a { display: flex; flex-direction: column; gap: .32rem; text-decoration: none; padding: 1.3rem 1.55rem; border: 1px solid #fbf8f0; background: #e8ebe2; border-radius: 1.1rem; box-shadow: var(--shadow); }
.split-links a:hover { border-color: var(--moss); }
.split-links strong { font-size: 1.14rem; }
.split-links span, .muted { color: var(--muted); }
.readable { max-width: 52rem; }
.contact { background: var(--mist); color: var(--text); border-radius: 1.4rem; padding: 1.5rem 2rem; }
.contact a { color: var(--dark); }
.site-footer { border-top: 1px solid var(--line); padding: 1.8rem 0; margin-top: 2rem; color: var(--muted); }
.foot-inner, .between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem; }
.class-hero { margin-top: 2rem; padding: clamp(1.6rem, 5vw, 3.5rem); background: linear-gradient(120deg, #f6f2e9, #e0e7dc); border: 1px solid #fffcf5; border-radius: 1.6rem; box-shadow: var(--shadow); }
.class-hero .text-link + h1 { margin-top: .48rem; }
.class-hero h1 { font-size: clamp(2.65rem, 5.4vw, 5.1rem); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1rem 1.65rem; }
.chip, .tag { display: inline-flex; align-items: center; border-radius: 2rem; font-size: .86rem; line-height: 1.25; white-space: nowrap; }
.chip { padding: .55rem .8rem; text-decoration: none; border: 1px solid var(--line); background: var(--white); }
.chip.current, .chip:hover { background: var(--dark); color: white; }
.tag { padding: .35rem .65rem; background: #eee9e1; color: #4e554c; }
.tag.good { background: var(--mist); color: #344c3d; }
.tag.warn { background: #f2e7d7; color: #704b2e; }
.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; align-items: start; }
.photo-card { background: var(--white); overflow: hidden; border: 1px solid #fff9; border-radius: 1.05rem; box-shadow: 0 4px 11px #4b422414; }
.photo-card img { width: 100%; aspect-ratio: 1.28; object-fit: cover; background: var(--mist); }
.portrait-grid .photo-card img { aspect-ratio: .78; object-fit: contain; background: #ece9e1; }
.photo-card figcaption, .photo-label { display: flex; align-items: center; gap: .5rem; min-height: 3rem; padding: .65rem .75rem; font-size: .875rem; overflow-wrap: anywhere; }
.photo-card figcaption { flex-wrap: wrap; justify-content: space-between; }
.photo-card figcaption span { color: var(--muted); }
.photo-card:has(input:checked) { outline: 2px solid var(--sage); outline-offset: -2px; }
.photo-label { cursor: pointer; }
.photo-label input { margin: 0; flex: none; }
.submit-bar, .form-panel { padding: clamp(1rem, 2.5vw, 1.65rem); }
.submit-bar { margin-top: 1rem; background: #e8ebe2; border-radius: 1.15rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
form > div { min-width: 0; }
label { display: block; font-size: .93rem; font-weight: 650; margin-bottom: .25rem; }
input:not([type=checkbox],[type=radio],[type=range],[type=hidden]), textarea, select {
  display: block; width: 100%; min-width: 0; background: #faf6ef; border: 1px solid #c7c7ba; border-radius: .8rem; min-height: 2.7rem; padding: .55rem .7rem; color: var(--text); margin-bottom: .75rem;
}
input[type=checkbox], input[type=radio] { accent-color: var(--dark); width: 1.2rem; height: 1.2rem; vertical-align: middle; }
input[type=range] { display: block; width: 100%; accent-color: var(--dark); }
textarea { resize: vertical; min-height: 4rem; }
.form-panel h2, .class-hero h2 { font-size: clamp(1.55rem, 2.8vw, 2.35rem); }
.form-panel h2, .form-panel h3, .form-panel legend { margin-bottom: .65rem; }
.form-panel form { margin-top: .8rem; }
.profile-grid { margin-block: 1rem 2rem; align-items: start; }
.full-span { grid-column: 1/-1; }
.chosen-portraits { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .65rem; }
.chosen-portraits img { width: min(100%, 8.5rem); height: 10.5rem; object-fit: contain; background: #e7ece4; border-radius: .5rem; }
.signature { width: min(9rem, 100%); border: 1px solid var(--line); border-radius: .45rem; }
[data-crop-controls] { display: grid; grid-template-columns: 1fr; gap: .6rem; max-width: 25rem; }
[data-crop-controls] canvas { background: white; border: 1px solid var(--line); width: min(100%, 13rem); height: auto; border-radius: .55rem; }
.ballot { margin: .8rem 0; }
.access { max-width: 38rem; margin: 1.25rem auto 0; }
.access h1 { font-size: clamp(2rem, 4.5vw, 3.6rem); }
.access .text-link { display: block; margin-top: 1.15rem; }
.notices { margin-block: .75rem; }
.notice { padding: .65rem .9rem; background: var(--mist); border-inline-start: .25rem solid var(--sage); border-radius: .8rem; }
.notice.error, .errorlist { color: #7f2220; background: #fcebe8; border-color: #ae5148; }
.lightbox { max-width: min(95vw, 70rem); max-height: 95vh; padding: .8rem; border: none; border-radius: .8rem; background: #17241d; color: white; }
.lightbox::backdrop { background: #111d16db; }
.lightbox form { text-align: right; }
.lightbox img { width: auto; max-width: 100%; max-height: 75vh; object-fit: contain; margin: .45rem auto; }
.lightbox-caption { text-align: center; }
.studio { background-color: #f2efe8; }
.studio h1 { font-size: clamp(2.15rem, 4.25vw, 4.25rem); }
.page-heading { margin: .7rem 0 1.5rem; }
.project-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.project-card { padding: 1.2rem; }
.project-card h2 { font-size: 1.7rem; margin-block: .72rem; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.stats > div { padding: .85rem; display: flex; flex-direction: column; background: var(--mist); border-radius: 1rem; }
.stats strong { font-size: 1.8rem; letter-spacing: -.04em; line-height: 1.1; }
.stats span { font-size: .88rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.table-wrap { border: 1px solid var(--line); border-radius: .7rem; width: 100%; overflow: auto; margin-top: 1rem; background: white; }
table { width: 100%; border-collapse: collapse; text-align: start; font-size: .88rem; }
th, td { text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); padding: .6rem .65rem; overflow-wrap: anywhere; }
th { background: #e3e7dd; white-space: nowrap; }
td { min-width: 7rem; max-width: 24rem; }
td:first-child { min-width: 10rem; }
tbody tr:last-child td { border-bottom: 0; }
.files-list { list-style: none; padding: 0; margin: .75rem 0; }
.files-list li { border-bottom: 1px solid var(--line); padding: .65rem 0; overflow-wrap: anywhere; }
.files-list li > * { min-width: 0; }
.file-accordion { margin-top: .8rem; }
.filename-export {
  width: min(100% - 2rem, 34rem);
  max-height: calc(100% - 2rem);
  padding: clamp(1.1rem, 4vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--text);
  background: var(--white);
}
.filename-export::backdrop { background: #111d16a6; }
.filename-export h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); }
.filename-export > .between { flex-wrap: nowrap; margin-bottom: 1.15rem; }
.filename-export textarea { background: var(--paper); margin-bottom: .35rem; }
.filename-export > .muted { font-size: .9rem; margin: 0 0 1rem; }
.filename-export .actions { justify-content: flex-end; margin-top: 1.15rem; }
[data-portrait-dialog] .form-row { grid-template-columns: 1fr; gap: .45rem; }
.profile-save { margin-block: 1.2rem 2rem; }
.profile-save-status { margin: 0; font-size: .9rem; }
.photo-card.portrait-selected { outline: 2px solid var(--sage); outline-offset: -2px; }
.lightbox .lightbox-select { display: flex; margin: .5rem auto; }
[data-portrait-preview] img { width: 5rem; height: 6rem; }
.quote-preview { border-inline-start: .2rem solid var(--sage); padding: .6rem .8rem; background: var(--paper); border-radius: .6rem; }
.quote-preview blockquote { margin: .3rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.signature-example { margin-block: .6rem; }
.signature-example figure { margin-block: .45rem; }
.signature-example figure span { display: inline-block; font: italic 1.5rem "Segoe Script", cursive; background: white; padding: 1rem 1.5rem; border: 1px solid var(--line); }
[data-crop-controls] canvas { touch-action: none; cursor: grab; }
.pupil-preview { margin-top: .55rem; }
.pupil-preview-content { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-top: .45rem; width: min(27rem, 76vw); }
.pupil-preview-content img { max-width: 7rem; margin-top: .35rem; border-radius: .4rem; }
.profile-progress { padding: 0; list-style: none; }
[data-upload-progress] { width: 100%; accent-color: var(--dark); }
form.actions select { width: auto; margin: 0; }
@media (max-width: 58rem) {
  .shell { width: min(100% - 3rem, 75rem); }
  .project-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 43rem) {
  :root { --profile-save-space: calc(7rem + env(safe-area-inset-bottom, 0px)); }
  html:has(.profile-save) { scroll-padding-bottom: calc(var(--profile-save-space) + var(--profile-keyboard-inset, 0px)); }
  body:has(.profile-save) { padding-bottom: var(--profile-save-space); }
  .profile-save {
    position: fixed;
    inset-inline: 0;
    bottom: var(--profile-keyboard-inset, 0px);
    z-index: 20;
    justify-content: center;
    margin: 0;
    padding: .65rem max(1rem, env(safe-area-inset-right, 0px)) calc(.65rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
    background: var(--paper);
    border-top: 1px solid var(--line);
    box-shadow: 0 -7px 22px #59483916;
  }
  .profile-save .button { width: min(100%, 33rem); min-height: 3rem; }
  .profile-save-status { width: 100%; text-align: center; line-height: 1.25; max-height: 2.5em; overflow-y: auto; }
  .shell { width: calc(100% - 2rem); }
  .nav { flex-wrap: wrap; justify-content: flex-start; padding-block: .8rem; gap: .6rem 1rem; }
  .nav nav { order: 2; width: 100%; gap: .75rem 1.05rem; flex-wrap: wrap; }
  .nav .desktop { display: none; }
  .nav nav a { font-size: .88rem; }
  .hero { grid-template-columns: 1fr; min-height: auto; border-radius: 1.1rem; }
  .hero-copy { padding: 1.65rem 1.45rem; }
  .hero-media { min-height: 15rem; aspect-ratio: 1.6; }
  .hero h1 { font-size: clamp(2.55rem, 10vw, 4rem); }
  .offer-grid, .profile-grid, .project-list { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .split-links a { padding: .8rem; }
  .split-links strong { font-size: 1rem; }
  .split-links span { font-size: .875rem; }
  .photo-label, .photo-card figcaption { padding-inline: .55rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .class-hero { margin-top: 1rem; }
}
@media (max-width: 23rem) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .split-links { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
