input::placeholder,
textarea::placeholder {
  color: #a89f93;
}

:root {
  color-scheme: light;
  --ink: #211c16;
  --muted: #645c52;
  --line: rgba(48, 36, 22, 0.14);
  --paper: #fffdf8;
  --bg: #ebe4d6;
  --green: #1f6a4a;
  --green-ink: #f3fff8;
  --clay: #9c4328;
  --shadow: 0 24px 60px rgba(72, 48, 20, 0.12);
  --page: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.25rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html { overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  min-width: 0;
  color: var(--ink);
  font-family: "Public Sans", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  background:
    radial-gradient(900px 420px at -10% -20%, #f7f1e4 0%, transparent 55%),
    radial-gradient(800px 480px at 110% -10%, #e4efe6 0%, transparent 50%),
    var(--bg);
}

h1, h2, h3, p, ul, ol { margin: 0; }

a { color: inherit; }

button, input, textarea { font: inherit; color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: white;
  padding: 0.5rem 0.8rem;
  z-index: 5;
}

.skip:focus { top: 1rem; }

.top, .hero, .panel, .list-page {
  width: min(var(--page), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem 1.5rem;
  padding: 1.35rem 0 0.35rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 640;
  letter-spacing: -0.03em;
}

.mark-icon {
  width: 1.7rem;
  height: 1.7rem;
  display: block;
  flex: none;
  border-radius: 0.42rem;
}

nav { display: flex; gap: 0.35rem 1.35rem; align-items: center; flex-wrap: wrap; }

nav a, nav button { padding: 0.35rem 0; }

nav a { text-decoration: none; }

nav button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
}

.hero, .panel, .list-page { padding: 2.75rem 0 5rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.hero > *, .split > * { min-width: 0; }

.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--green);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1, h2, .paper-name {
  font-family: Fraunces, Georgia, serif;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.75rem);
  overflow-wrap: break-word;
}

.panel h1, .list-page h1 {
  font-size: clamp(2.15rem, 4vw, 3rem);
  line-height: 1.15;
}

.lede {
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 38rem;
  margin-top: 1.35rem;
  color: var(--muted);
  overflow-wrap: break-word;
}

.panel:not(.split) > :not(h1),
.list-page > :not(h1) { max-width: 40rem; }

.wait-bar {
  margin-top: 1.5rem;
  height: 0.45rem;
  max-width: 22rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(48, 36, 22, 0.1);
}

.wait-bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: var(--green);
  animation: wait-slide 1.4s ease-in-out infinite;
}

@keyframes wait-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.actions, .public-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.75rem;
}

.button, button.button, a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: var(--green-ink);
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
}

.button.secondary, a.secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.button:disabled { opacity: 0.6; cursor: wait; }

.auth-panel { align-items: center; }

.auth-card {
  width: min(100%, 24rem);
  margin: 0 auto;
  padding: 1.75rem 1.5rem 1.35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(72, 48, 20, 0.12);
}

.auth-card h1 { font-size: clamp(2rem, 4vw, 2.6rem); }

.auth-mark { width: 2.4rem; height: 2.4rem; }

.auth-card .lede { margin-top: 0.35rem; }

.auth-submit { width: 100%; margin-top: 0.4rem; }

.auth-forgot { margin: 0.15rem 0 0.85rem; text-align: right; }
.auth-switch { margin: 1.15rem 0 0; text-align: center; color: var(--muted); }

.auth-switch a { color: var(--green); font-weight: 600; }

.button.danger {
  background: transparent;
  color: var(--clay);
  box-shadow: inset 0 0 0 1px rgba(156, 67, 40, 0.35);
}

.steps { list-style: none; padding: 0; margin: 3rem 0 0; max-width: 36rem; }

.steps li {
  display: grid;
  grid-template-columns: 2.15rem 1fr;
  gap: 0.85rem 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  align-items: start;
}

.steps li:last-child { border-bottom: 1px solid var(--line); }

.steps li > strong:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: rgba(31, 106, 74, 0.1);
  color: var(--green);
  font-family: Fraunces, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 640;
}

.steps li > div strong { display: block; margin-bottom: 0.15rem; }

.steps span, .quiet, .help { color: var(--muted); }

.trust { margin-top: 1.35rem; max-width: 36rem; }

.stage { position: relative; min-height: 28rem; }

.hero-stage {
  min-height: 30rem;
  padding: 0.25rem 0 1rem;
}

.hero-stage .paper-back {
  inset: 0.65rem 0.15rem auto auto;
  height: 92%;
  background: linear-gradient(145deg, #efe6d6 0%, #f7f1e6 55%, #e8efe9 100%);
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(72, 48, 20, 0.08);
}

.hero-paper {
  position: relative;
  font-size: clamp(0.78rem, 2.45cqi, 0.92rem);
  max-height: 34rem;
  overflow: hidden;
  border-radius: 3px;
}

.hero-paper::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.5rem;
  background: linear-gradient(180deg, transparent 0%, rgba(235, 228, 214, 0.92) 85%);
  pointer-events: none;
}

.hero-stage .paper-classic {
  transform: rotate(1.05deg);
  transform-origin: 50% 20%;
}

.hero .paper-stack {
  gap: 0;
}

.hero .paper-stack .paper-sheet {
  transform: rotate(1.1deg);
  transform-origin: 50% 0;
}

.hero .paper-stack .paper-sheet + .paper-sheet {
  margin-top: -5.25rem;
  transform: rotate(-0.35deg);
  z-index: 1;
  position: relative;
}

.hero .paper-stack .paper-sheet:first-child {
  z-index: 2;
  position: relative;
}

.hero .paper.paper-classic,
.hero .paper-stack .paper-sheet.paper-classic {
  border-radius: 3px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 28px 56px rgba(48, 32, 12, 0.14),
    0 0 0 1px rgba(40, 30, 20, 0.06);
}

.paper-sheet-continued .paper-body {
  padding-top: 1.35rem;
}

.paper-sheet-continued::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--green);
}

.hero .paper { transform: none; }

.paper-frame {
  position: relative;
  width: 100%;
  container-type: inline-size;
}

.pdf-view {
  display: block;
  width: 100%;
  height: calc(100cqi * 11 / 8.5);
  border: 0;
  background: #525659;
}

.paper-stack {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.paper-sheet {
  min-height: calc(100cqi * 11 / 8.5);
  box-sizing: border-box;
}

.paper-stack .paper-sheet + .paper-sheet {
  box-shadow: var(--shadow), 0 0 0 1px rgba(40, 30, 20, 0.04);
}

.paper {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(40, 30, 20, 0.08);
  box-shadow: var(--shadow);
  padding: 2rem 1.85rem 2.15rem;
  border-radius: 2px;
  line-height: 1.5;
}

.hero .paper { transform: rotate(1.25deg); }

.paper-back {
  position: absolute;
  inset: 1.2rem 0.4rem auto auto;
  width: min(92%, 100%);
  height: 88%;
  background: #f3ecdf;
  border: 1px solid var(--line);
  transform: rotate(-2.5deg);
  z-index: -1;
}

.paper-name { font-size: 2rem; line-height: 1.15; margin: 0; }

.paper.paper-classic {
  padding: 0;
  background: #fffdf8;
  border-color: rgba(40, 30, 20, 0.1);
}

.paper-classic .paper-header-band {
  background: #f7f4ee;
  border-top: 4px solid var(--green);
  padding: 1.35rem 1.85rem 1.05rem;
}

.paper-classic .paper-header-band .paper-contact { margin-top: 0.45rem; }

.paper-classic .paper-body { padding: 0.85rem 1.85rem 2.15rem; }

.paper-classic .paper-intro {
  margin-top: 0;
  border-left: 2px solid var(--green);
  padding-left: 0.65rem;
}

.paper-classic .paper-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.15rem 0 0.45rem;
  padding-bottom: 0;
  border-bottom: 0;
  width: auto;
  max-width: none;
}

.paper-classic .paper-section-title::before {
  content: "";
  flex-shrink: 0;
  width: 3px;
  height: 0.68rem;
  background: var(--green);
  border-radius: 1px;
}

.paper-classic .paper-body > .paper-intro + .paper-section-title,
.paper-classic .paper-body > .paper-section-title:first-child {
  margin-top: 0.65rem;
}

.paper-classic h3 .star-count {
  font-weight: 400;
  font-size: 0.88em;
  color: var(--muted);
  margin-left: 0.35rem;
}

.paper-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.paper-header { margin: 0; }

.paper-rule {
  margin: 0.55rem 0 0;
  border: 0;
  border-top: 1px solid #d4cbbd;
}

.paper-intro { margin-top: 0.55rem; }

.paper-intro .paper-line { margin-top: 0; }

.paper-intro .paper-summary { margin-top: 0.45rem; }

.paper-contact, .paper-line, .paper-summary, .paper-skills, .paper-education, .paper-url { margin-top: 0.55rem; }

.paper-contact { color: var(--muted); font-size: 0.92rem; line-height: 1.45; }

.paper-contact span + span::before { content: "  ·  "; }

.paper-line {
  margin-top: 0.9rem;
  font-family: Fraunces, Georgia, serif;
  font-style: italic;
  color: var(--ink);
}

.paper-summary { margin-top: 0.7rem; line-height: 1.55; }

.paper-column { min-width: 0; }

.paper-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(48, 36, 22, 0.16);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.icon-button:hover {
  border-color: rgba(31, 106, 74, 0.45);
  background: #fff;
}

.icon-button:active { transform: translateY(1px); }

.icon-button .icon { display: block; }

.public-paper-tools { max-width: 42rem; margin-inline: auto; padding-inline: 0.15rem; }

.public-paper-wrap {
  width: min(42rem, 100%);
  max-width: 42rem;
  margin-inline: auto;
}

.public-paper { width: 100%; }

.paper-edit {
  font: inherit;
  color: inherit;
  line-height: inherit;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  outline: none;
  border-radius: 0.15rem;
  caret-color: var(--green);
}

.paper-edit:focus {
  background: rgba(31, 106, 74, 0.1);
  box-shadow: 0 1px 0 var(--green);
}

.paper h2:not(.paper-name) {
  font-size: 0.72rem;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin: 1.15rem 0 0.45rem;
  padding-bottom: 0.32rem;
  border-bottom: 1px solid #e8e0d4;
  width: fit-content;
  max-width: 100%;
}

.paper-intro + h2:not(.paper-name),
.paper-header + h2:not(.paper-name) {
  margin-top: 1rem;
}

.paper-sheet > :first-child {
  margin-top: 0;
}

.paper-sheet > h2:not(.paper-name):first-child {
  margin-top: 0.15rem;
}

.paper h3 { font-size: 1.02rem; line-height: 1.3; margin: 1.15rem 0 0.1rem; }

.paper-role + .paper-role { margin-top: 0.15rem; }

.paper section + section { margin-top: 0.35rem; }

.paper ul { margin-top: 0.35rem; padding-left: 1.15rem; }

.paper li { margin: 0.45rem 0; line-height: 1.5; }

.paper-url { color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }

.paper-skills { margin-top: 0.35rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.75rem; align-items: start; }

.meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.85rem; align-items: baseline; }

.split > div > * + * { margin-top: 0.85rem; }

.split > div > .section-label { margin-top: 1.5rem; }

.choice-row, .projects { display: grid; gap: 0.85rem; margin-top: 1rem; }

.choice-block { display: grid; gap: 0.75rem; }

.choice-block .projects { margin-top: 0; }

.choice-tools { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; align-items: center; }

.text-button {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.choice, .project {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1rem;
  align-items: start;
  padding: 1rem 1.1rem;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.choice.is-on, .project.is-on { border-color: var(--green); background: #f4faf6; }

.choice strong { display: block; margin-bottom: 0.2rem; }

.project strong { display: inline; }

.project em {
  margin-left: 0.45rem;
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--clay);
}

.star-count {
  margin-left: 0.55rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.project small, .choice span { display: block; color: var(--muted); }

.project small + small { margin-top: 0.2rem; }

.field { display: grid; gap: 0.45rem; margin: 1.15rem 0; }

.field span { font-weight: 600; }

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input { padding-right: 2.85rem; }

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--ink);
  background: rgba(48, 36, 22, 0.06);
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(31, 106, 74, 0.45);
  outline-offset: 1px;
}

.password-toggle .icon-eye-off { display: none; }

.password-toggle.is-revealed .icon-eye { display: none; }

.password-toggle.is-revealed .icon-eye-off { display: block; }

textarea { resize: vertical; min-height: 9rem; }

.banner {
  background: #fff4ee;
  border: 1px solid rgba(156, 67, 40, 0.25);
  color: #6d2e1c;
  padding: 0.9rem 1.05rem;
  border-radius: 12px;
  margin-top: 1.25rem;
}

.guest-banner {
  background: #eef6f1;
  border: 1px solid rgba(31, 106, 74, 0.22);
  color: var(--ink);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-top: 1.15rem;
  line-height: 1.5;
}

.guest-banner a {
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
}

.guest-banner a:hover { text-decoration: underline; }

.guest-banner .guest-connect {
  font-weight: 600;
  text-decoration: none;
}

.guest-banner .guest-connect:hover { text-decoration: underline; }

.auth-guest {
  margin: 1.15rem 0 0;
  text-align: center;
}

.auth-guest .button { width: 100%; }

.ok {
  background: #eef6f1;
  border: 1px solid rgba(31, 106, 74, 0.2);
  color: #184c35;
  padding: 0.9rem 1.05rem;
  border-radius: 12px;
  margin-top: 1.25rem;
}

.help { margin-top: 0.55rem; }

.link-box {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.55rem;
}

.link-box input { flex: 1; min-width: 12rem; }

.cards { display: grid; gap: 0.9rem; margin-top: 1.5rem; }

.link-remove .actions { margin-top: 0.35rem; }

.card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 1.15rem 1.25rem;
  background: rgba(255, 253, 248, 0.76);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.card-main {
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.card-side {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: none;
}

.card-side a { color: inherit; text-decoration: none; }

.text-button.danger { color: var(--clay); }

.card small { display: block; margin-top: 0.2rem; }

.section-label {
  margin: 2.1rem 0 0.35rem;
  font-weight: 600;
}

.public-main {
  width: min(760px, calc(100% - var(--gutter) * 2));
  margin: 0 auto;
  padding: 2.5rem 0 4.5rem;
}

.public-mark { margin-bottom: 1.35rem; }

.public-main > .quiet { margin-top: 1.25rem; }

.public-paper { transform: none; }

.noscript { padding: 1rem 6vw; }

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr); gap: 4.5rem; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr); gap: 3.5rem; }
}

@media (max-width: 899px) {
  .hero .paper, .paper-back { transform: none; }
  .stage { min-height: 0; }
  .hero, .panel, .list-page { padding-top: 2rem; padding-bottom: 3.5rem; }
  .link-box { display: grid; justify-items: start; }
  .link-box input { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .paper, .paper-back { transform: none; }
  .wait-bar span { animation: none; width: 55%; transform: none; }
}
