:root {
  --ink: #14251f;
  --ink-soft: #33473f;
  --muted: #607069;
  --paper: #f5f3ec;
  --paper-deep: #ece9df;
  --card: #fffefa;
  --line: #d9dcd3;
  --green: #14664e;
  --green-dark: #0e4d3b;
  --mint: #dcebe3;
  --mint-bright: #8bd3b2;
  --orange: #b74c2d;
  --orange-soft: #f2d9cf;
  --shadow: 0 18px 50px rgba(20, 37, 31, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 8%, rgba(139, 211, 178, .11), transparent 23rem),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, select, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #ef9b79;
  outline-offset: 3px;
}
.skip-link { position: fixed; left: 18px; top: -80px; z-index: 100; padding: 11px 16px; border-radius: 10px; background: var(--ink); color: white; text-decoration: none; }
.skip-link:focus { top: 14px; }
.hidden { display: none !important; }

.topbar {
  min-height: 78px;
  border-bottom: 1px solid rgba(20, 37, 31, .1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 10px clamp(20px, 5vw, 76px);
  background: rgba(245, 243, 236, .9);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark, .mini-mark {
  position: relative;
  display: block;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--green);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--green) 0 2px, transparent 2.5px 7px, rgba(20,102,78,.38) 7.5px 8.5px, transparent 9px 14px, rgba(20,102,78,.22) 14.5px 15.5px, transparent 16px);
}
.brand-mark::before { content: ""; position: absolute; left: 50%; bottom: 50%; width: 1.5px; height: 17px; background: var(--orange); transform-origin: bottom; transform: rotate(42deg); border-radius: 2px; }
.brand-mark i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); right: 8px; top: 8px; box-shadow: 0 0 0 4px rgba(183,76,45,.12); }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 16px; letter-spacing: -.01em; }
.brand-copy small { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.topbar nav { display: flex; gap: 5px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.48); border: 1px solid rgba(20,37,31,.06); }
.nav-button { min-height: 42px; border: 0; background: transparent; padding: 10px 16px; border-radius: 999px; color: var(--muted); cursor: pointer; font-weight: 650; }
.nav-button:hover { color: var(--ink); }
.nav-button.active { background: var(--card); color: var(--green-dark); box-shadow: 0 3px 12px rgba(20,37,31,.08); }

main { max-width: 1220px; margin: auto; padding: 0 30px 82px; }
.hero { min-height: 490px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr); align-items: center; gap: clamp(30px, 8vw, 110px); padding: 72px 0 58px; border-bottom: 1px solid var(--line); }
.hero-copy { max-width: 800px; }
.eyebrow, .section-kicker { margin: 0; color: var(--orange); font-size: 11px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow span { display: inline-block; width: 22px; height: 1px; margin: 0 7px 3px 0; background: currentColor; }
.hero h1, .section-heading h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(50px, 7.2vw, 88px);
  line-height: .95;
  letter-spacing: -.052em;
  margin: 13px 0 24px;
  font-weight: 500;
}
.hero h1 span, .section-heading h1 em { color: var(--green); font-style: normal; }
.hero-summary, .section-heading > p:last-child { max-width: 730px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 30px; }
.hero-actions small { color: var(--muted); }
.primary, .secondary { min-height: 46px; border-radius: 999px; padding: 13px 21px; font-weight: 760; cursor: pointer; white-space: nowrap; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.primary { border: 0; background: var(--green); color: white; box-shadow: 0 9px 25px rgba(20,102,78,.22); }
.primary:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(20,102,78,.26); }
.primary:disabled { opacity: .55; transform: none; cursor: wait; }
.secondary { border: 1px solid #cfd4cc; background: var(--card); color: var(--ink); }
.secondary:hover { border-color: #aab7b0; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(20,37,31,.07); }

.hero-radar { justify-self: end; position: relative; width: min(31vw, 330px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 1px solid rgba(20,102,78,.3); background: repeating-radial-gradient(circle, rgba(20,102,78,.18) 0 1px, transparent 1px 24%), linear-gradient(145deg, rgba(255,255,255,.72), rgba(220,235,227,.45)); box-shadow: inset 0 0 50px rgba(20,102,78,.08), 0 28px 60px rgba(20,37,31,.08); }
.hero-radar::before, .hero-radar::after { content: ""; position: absolute; background: rgba(20,102,78,.16); }
.hero-radar::before { width: 100%; height: 1px; top: 50%; }
.hero-radar::after { height: 100%; width: 1px; left: 50%; }
.radar-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 300deg, rgba(20,102,78,.03) 320deg, rgba(20,102,78,.3) 359deg, transparent 360deg); animation: heroSweep 6s linear infinite; }
.signal { position: absolute; z-index: 2; width: 8px; height: 8px; background: var(--orange); border-radius: 50%; box-shadow: 0 0 0 6px rgba(183,76,45,.12), 0 0 18px rgba(183,76,45,.5); }
.signal-one { left: 29%; top: 34%; }
.signal-two { right: 26%; top: 25%; animation: signalPulse 2.2s 1s infinite; }
.signal-three { right: 33%; bottom: 24%; animation: signalPulse 2.6s .4s infinite; }
.hero-radar strong { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%,-50%); color: var(--green-dark); font-family: Georgia, serif; font-size: clamp(15px, 1.6vw, 22px); font-weight: 500; text-align: center; line-height: 1.05; letter-spacing: -.02em; }

.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.trust-strip > div { position: relative; display: grid; grid-template-columns: 32px 1fr; column-gap: 10px; padding: 21px 28px; border-right: 1px solid var(--line); }
.trust-strip > div:last-child { border-right: 0; }
.trust-strip span { grid-row: 1 / 3; color: var(--orange); font-family: Georgia, serif; font-size: 15px; }
.trust-strip strong { font-size: 13px; }
.trust-strip small { margin-top: 2px; color: var(--muted); }

.notice { margin: 25px 0 0; padding: 15px 18px; background: #fff5d9; border: 1px solid #e6d5a4; border-radius: 14px; color: var(--ink-soft); }
.notice button { min-height: 38px; border: 0; background: transparent; color: var(--green); font-weight: 800; cursor: pointer; }
.feed-toolbar, .favorites-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin: 46px 0 20px; }
.feed-toolbar h2, .favorites-heading h2 { margin: 4px 0 6px; font-family: Georgia, serif; font-size: 34px; font-weight: 500; letter-spacing: -.025em; }
.feed-toolbar p:not(.section-kicker), .favorites-heading p:not(.section-kicker) { margin: 0; color: var(--muted); }
.feed-toolbar label { color: var(--muted); font-size: 12px; font-weight: 700; }
.feed-toolbar select { display: block; min-height: 44px; margin-top: 7px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 9px 34px 9px 12px; color: var(--ink); }

.paper-list { display: grid; gap: 14px; }
.paper-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 19px; padding: 22px; display: grid; grid-template-columns: 190px 74px minmax(0,1fr) auto; gap: 20px; align-items: start; box-shadow: 0 3px 12px rgba(20,37,31,.035); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.paper-card::before { content: ""; position: absolute; left: -1px; top: 24px; bottom: 24px; width: 3px; border-radius: 0 3px 3px 0; background: var(--green); opacity: .75; }
.paper-card:hover { transform: translateY(-2px); border-color: #c1cac4; box-shadow: var(--shadow); }
.score { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green) calc(var(--score)*1%), var(--mint) 0); position: relative; }
.score::after { content: ""; position: absolute; inset: 7px; background: var(--card); border-radius: 50%; }
.score strong { z-index: 1; font-size: 19px; }
.score small { z-index: 1; font-size: 8px; position: absolute; top: 47px; color: var(--muted); letter-spacing: .04em; }
.paper-meta { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--orange); font-weight: 800; }
.paper-card h3 { font-family: Georgia, serif; font-size: 25px; line-height: 1.22; letter-spacing: -.02em; margin: 7px 0 10px; font-weight: 500; }
.paper-card p { color: var(--muted); line-height: 1.58; margin: 0; }
.paper-card .why { display: inline-block; margin-top: 14px; padding: 6px 9px; border-radius: 8px; background: #edf5f1; color: var(--green-dark); font-size: 12px; }
.paper-actions { display: flex; gap: 7px; }
.icon-button { border: 1px solid var(--line); background: var(--card); width: 42px; height: 42px; border-radius: 50%; cursor: pointer; text-decoration: none; color: var(--ink); display: grid; place-items: center; }
.icon-button:hover { border-color: var(--green); color: var(--green); }
.paper-preview { position: relative; display: grid; width: 190px; aspect-ratio: 4/3; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(145deg,#eef5f0,#faf3ed); text-decoration: none; }
.paper-preview img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: contain; background: white; }
.paper-preview-label { position: absolute; z-index: 3; left: 7px; right: 7px; bottom: 7px; padding: 5px 7px; border-radius: 7px; color: white; background: rgba(14,40,31,.78); font-size: 9px; font-weight: 750; line-height: 1.25; }
.paper-preview-fallback { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; color: var(--green-dark); }
.paper-preview-fallback i { width: 46px; height: 34px; margin-bottom: 8px; border: 1.5px solid rgba(20,102,78,.42); border-radius: 6px; background: linear-gradient(135deg,transparent 47%,rgba(20,102,78,.25) 48% 52%,transparent 53%); }
.paper-preview-fallback strong { font-family: Georgia,serif; font-weight: 500; }
.paper-preview-fallback small { color: var(--muted); }
.paper-preview.image-loaded .paper-preview-fallback { display: none; }

.empty { text-align: center; padding: 62px 24px; background: rgba(255,254,250,.65); border: 1px solid var(--line); border-radius: 22px; }
.empty.compact { padding: 34px 20px; }
.empty h3 { font-family: Georgia, serif; font-size: 30px; font-weight: 500; letter-spacing: -.025em; margin: 18px 0 8px; }
.empty p { max-width: 590px; margin: 0 auto 22px; color: var(--muted); line-height: 1.6; }
.empty-radar { width: 66px; height: 66px; margin: auto; border: 1px solid rgba(20,102,78,.45); border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 10px, rgba(20,102,78,.2) 11px 12px); position: relative; overflow: hidden; }
.empty-radar::before { content: ""; position: absolute; left: 50%; bottom: 50%; width: 1px; height: 30px; background: var(--orange); transform-origin: bottom; transform: rotate(38deg); }
.empty-radar span { position: absolute; right: 14px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.empty-steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 0 0 25px; }
.empty-steps span { display: flex; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; background: rgba(255,255,255,.55); }
.empty-steps b { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--mint); color: var(--green-dark); font-size: 10px; }

.section-heading { padding: 76px 0 46px; border-bottom: 1px solid var(--line); }
.section-heading h1 { font-size: clamp(46px, 6vw, 72px); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 27px; box-shadow: var(--shadow); }
.panel.journals { grid-column: 1/-1; }
.step { display: flex; gap: 14px; margin-bottom: 22px; }
.step > span { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--green-dark); font-weight: 800; }
.step h2 { font-family: Georgia, serif; margin: 0 0 5px; font-size: 25px; font-weight: 500; letter-spacing: -.02em; }
.step p { margin: 0; color: var(--muted); line-height: 1.5; }
.dropzone { border: 1.5px dashed #aebbb4; border-radius: 15px; padding: 27px; display: grid; place-items: center; background: #f7faf7; cursor: pointer; }
.dropzone:hover { border-color: var(--green); background: #f1f7f3; }
.dropzone input { display: none; }
.dropzone span { font-size: 12px; color: var(--muted); margin-top: 5px; }
.field { display: block; font-size: 12px; font-weight: 760; margin-top: 18px; color: var(--ink-soft); }
.field input, .field textarea { width: 100%; border: 1px solid var(--line); background: #fafbf8; border-radius: 11px; padding: 13px; margin-top: 7px; resize: vertical; color: var(--ink); }
.field textarea:focus, .field input:focus { outline: 3px solid rgba(20,102,78,.2); border-color: var(--green); }
.form-actions { grid-column: 1/-1; display: flex; justify-content: flex-end; align-items: center; gap: 16px; color: var(--green); }
.inline-summary { display: inline-block; margin: 0 0 0 12px; color: var(--muted); font-size: 13px; }
.journal-browser { margin-top: 28px; padding: 27px; }
.journal-search-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.journal-search-row .field { margin: 0; }
.catalog-meta { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; padding: 16px 2px; }
.journal-results, .favorite-journals { display: grid; gap: 11px; }
.journal-card { border: 1px solid var(--line); background: #fafbf8; border-radius: 15px; padding: 19px 21px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.journal-card:hover { border-color: #b8c5bd; }
.journal-card h3 { font-family: Georgia, serif; font-size: 22px; font-weight: 500; margin: 4px 0 6px; }
.journal-card p { margin: 0 0 7px; color: var(--muted); }
.journal-card small { color: var(--muted); }
.journal-type { font-size: 10px; text-transform: uppercase; color: var(--orange); font-weight: 850; letter-spacing: .1em; }

footer { border-top: 1px solid var(--line); padding: 31px clamp(20px, 5vw, 76px); color: var(--muted); font-size: 12px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; }
footer p, footer small { margin: 0; }
footer p { text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.mini-mark { width: 25px; height: 25px; background: repeating-radial-gradient(circle, var(--green) 0 2px, transparent 2.5px 6px, rgba(20,102,78,.35) 6.5px 7.5px, transparent 8px); }

.search-progress { border-color: #cdd8d1 !important; background: var(--card) !important; }
.scan-head { background: linear-gradient(135deg, #eef7f2, #fff7f2) !important; }
.scan-stats { grid-template-columns: repeat(2, 1fr) !important; }

@keyframes heroSweep { to { transform: rotate(360deg); } }
@keyframes signalPulse { 50% { box-shadow: 0 0 0 10px rgba(183,76,45,0), 0 0 20px rgba(183,76,45,.6); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 820px) {
  .brand-copy small { display: none; }
  main { padding-inline: 18px; }
  .hero { min-height: 0; grid-template-columns: 1fr; padding: 54px 0 38px; }
  .hero-radar { display: none; }
  .trust-strip { grid-template-columns: 1fr; }
  .trust-strip > div { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: 10px; }
  .trust-strip > div:last-child { border-bottom: 0; }
  .profile-grid { grid-template-columns: 1fr; }
  .paper-card { grid-template-columns: 160px 62px minmax(0,1fr); }
  .paper-preview { width: 160px; }
  .paper-actions { grid-column: 3; }
  .panel.journals { grid-column: auto; }
  footer { grid-template-columns: 1fr; text-align: center; }
  footer p { text-align: center; }
  .footer-brand { justify-content: center; }
}

@media (max-width: 620px) {
  .topbar { min-height: 70px; padding: 9px 14px; align-items: center; }
  .brand-copy { display: none; }
  .brand-mark { width: 36px; height: 36px; }
  .topbar nav { gap: 1px; }
  .nav-button { min-height: 40px; padding: 8px 10px; font-size: 13px; }
  main { padding: 0 15px 52px; }
  .hero h1 { font-size: clamp(45px, 14vw, 64px); }
  .hero-summary { font-size: 16px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 10px; }
  .hero-actions .primary { width: 100%; }
  .feed-toolbar { align-items: flex-start; margin-top: 36px; }
  .feed-toolbar label { display: none; }
  .paper-card { grid-template-columns: 62px 1fr; padding: 16px; gap: 15px; }
  .paper-preview { grid-column: 1/-1; width: 100%; aspect-ratio: 16/9; }
  .paper-content { min-width: 0; }
  .score { width: 60px; height: 60px; }
  .score small { top: 39px; }
  .paper-actions { grid-column: 2; }
  .empty { padding: 44px 18px; }
  .empty-steps { display: grid; justify-content: stretch; }
  .empty-steps span { justify-content: flex-start; }
  .journal-search-row { grid-template-columns: 1fr; }
  .journal-card { display: block; }
  .journal-card button { width: 100%; margin-top: 15px; }
  .catalog-meta, .favorites-heading { align-items: flex-start; flex-direction: column; }
  .favorites-heading .secondary { width: 100%; }
  .inline-summary { display: block; margin: 12px 0 0; }
}
