:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #627069;
  --line: #d9e2dd;
  --paper: #fff;
  --wash: #f3f7f4;
  --mint: #c8f1dc;
  --green: #126342;
  --green-dark: #0c4931;
  --danger: #9e322d;
  --shadow: 0 28px 80px rgba(30, 64, 47, .11);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 50% 0%, rgba(200,241,220,.48), transparent 38rem), var(--wash); }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.shell { width: min(100% - 40px, 920px); margin: 0 auto; padding: 32px 0 36px; }
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 760; letter-spacing: .12em; }
.brandmark { display: grid; place-items: center; width: 30px; height: 30px; color: #fff; border-radius: 9px; background: var(--green-dark); font-family: Georgia, serif; font-size: 18px; letter-spacing: 0; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.portal-nav { display: inline-flex; padding: 3px; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 999px; }
.nav-button, .signout-button { min-height: 30px; padding: 0 12px; color: var(--muted); background: transparent; border: 0; border-radius: 999px; font-size: 11px; font-weight: 730; }
.nav-button.active { color: var(--green-dark); background: var(--paper); box-shadow: 0 2px 8px rgba(23,33,29,.08); }
.signout-button { border: 1px solid var(--line); background: rgba(255,255,255,.72); }
.eyebrow { margin: 0 0 15px; color: var(--green); font-size: 11px; line-height: 1.3; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-size: clamp(42px,7vw,70px); line-height: .98; letter-spacing: -.055em; font-weight: 630; }
.lede { margin: 24px auto 0; color: var(--muted); font-size: 17px; line-height: 1.55; }
.intro { padding: 84px 0 42px; text-align: center; }
.access-view { min-height: 70vh; display: grid; place-items: center; }
.access-card { width: min(100%, 640px); padding: 44px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.access-card h1 { font-size: clamp(38px,6vw,58px); }
.access-form { margin-top: 30px; }
.access-form label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 750; }
.access-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.access-row input, .field input, .history-search { min-height: 48px; padding: 0 14px; color: var(--ink); background: #fff; border: 1px solid #cdd9d2; border-radius: 11px; outline: none; }
.access-row input:focus, .field input:focus, .history-search:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(18,99,66,.12); }
.upload-card, .result-card { padding: 28px; background: rgba(255,255,255,.93); border: 1px solid rgba(205,219,211,.9); border-radius: 24px; box-shadow: var(--shadow); }
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 250px; padding: 34px; border: 1.5px dashed #9db9aa; border-radius: 17px; background: #fbfdfc; text-align: center; transition: 160ms ease; cursor: pointer; }
.drop-zone:hover, .drop-zone.dragging { border-color: var(--green); background: #f3fbf6; transform: translateY(-1px); }
.drop-zone:focus-within { outline: 3px solid rgba(18,99,66,.2); outline-offset: 3px; }
.drop-zone input { position: absolute; width: 1px; height: 1px; clip: rect(0 0 0 0); overflow: hidden; }
.upload-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 20px; color: var(--green-dark); border-radius: 17px; background: var(--mint); }
.upload-icon svg, .primary-button svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { font-size: 18px; font-weight: 680; }
.drop-help { margin-top: 8px; color: var(--muted); font-size: 13px; }
.file-summary { display: flex; align-items: center; gap: 14px; min-height: 76px; margin-top: 16px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; }
.pdf-chip { display: grid; place-items: center; width: 42px; height: 48px; color: #973831; background: #fae9e7; border-radius: 8px; font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.file-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
.file-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.file-copy span { color: var(--muted); font-size: 12px; }
.text-button { padding: 8px; color: var(--green); background: transparent; border: 0; font-size: 13px; font-weight: 700; }
.link-details { display: grid; grid-template-columns: minmax(0,1fr) 110px; gap: 14px; margin-top: 18px; }
.field label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 750; }
.field input { width: 100%; }
.field p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.file-check { margin-top: 18px; padding: 13px 15px; color: var(--green-dark); background: #eaf8f0; border: 1px solid #b8e4cc; border-radius: 11px; font-size: 12px; font-weight: 680; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 58px; margin-top: 22px; padding: 0 20px; color: #fff; background: var(--green-dark); border: 1px solid var(--green-dark); border-radius: 14px; font-weight: 760; box-shadow: 0 12px 28px rgba(12,73,49,.18); }
.primary-button.compact { width: auto; min-height: 48px; margin: 0; }
.primary-button:hover:not(:disabled) { background: #083c28; transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: .42; box-shadow: none; }
.primary-button svg { width: 19px; }
.mode-note { margin: 12px 0 0; color: var(--muted); text-align: center; font-size: 11px; }
.error-message { margin-top: 16px; padding: 12px 14px; color: var(--danger); background: #fff2f1; border: 1px solid #f0c7c4; border-radius: 10px; font-size: 13px; }
.result-card { margin-top: 22px; }
.result-card h2 { margin: 0; font-size: 26px; letter-spacing: -.025em; }
.link-output { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 7px 7px 7px 16px; background: #f2f7f4; border: 1px solid #d5e3db; border-radius: 13px; }
.link-output span { flex: 1; min-width: 0; overflow: hidden; color: var(--green-dark); text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-size: 12px; }
.copy-button, .secondary-button, .small-button { min-height: 40px; padding: 0 14px; color: var(--green-dark); background: #fff; border: 1px solid #b8cec2; border-radius: 9px; font-size: 12px; font-weight: 750; }
.copy-button { color: #fff; background: var(--green-dark); border: 0; }
.result-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.result-actions { display: flex; align-items: center; gap: 14px; margin-top: 15px; }
.history-view { padding: 82px 0 10px; }
.history-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.history-heading h1 { font-size: clamp(42px,7vw,64px); }
.history-search { width: min(100%,280px); }
.history-status { padding: 28px; color: var(--muted); background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 16px; text-align: center; font-size: 13px; }
.history-list { display: grid; gap: 12px; }
.history-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; padding: 18px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 16px; }
.history-item.inactive { opacity: .66; }
.history-main { min-width: 0; }
.history-title-row { display: flex; align-items: center; gap: 9px; }
.history-title-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.status-pill { padding: 4px 7px; color: var(--green-dark); background: #e6f6ed; border-radius: 999px; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.status-pill.inactive { color: #6b716e; background: #e9eeeb; }
.history-url { display: block; margin-top: 8px; overflow: hidden; color: var(--green); text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace,monospace; font-size: 10px; }
.history-meta { margin-top: 8px; color: var(--muted); font-size: 10px; }
.history-actions { display: flex; align-items: center; gap: 7px; }
.small-button { min-height: 35px; padding: 0 10px; font-size: 10px; }
.small-button.danger { color: var(--danger); border-color: #e6c7c4; }
.small-button:disabled { cursor: not-allowed; opacity: .42; }
footer { display: flex; justify-content: center; gap: 9px; padding-top: 25px; color: #85918b; font-size: 10px; }
@media (max-width: 620px) {
  .shell { width: min(100% - 24px,920px); padding-top: 18px; }
  .brandbar { align-items: flex-start; }
  .header-actions { align-items: flex-end; flex-direction: column-reverse; }
  .access-card, .upload-card, .result-card { padding: 20px 16px; border-radius: 18px; }
  .access-row, .link-details { grid-template-columns: 1fr; }
  .primary-button.compact { width: 100%; }
  .intro { padding: 58px 6px 30px; }
  .drop-zone { min-height: 220px; padding: 24px 16px; }
  .link-output, .result-actions, .history-heading { align-items: stretch; flex-direction: column; }
  .link-output span { white-space: normal; overflow-wrap: anywhere; }
  .history-view { padding-top: 56px; }
  .history-search { width: 100%; }
  .history-item { grid-template-columns: 1fr; }
  .history-actions { flex-wrap: wrap; }
  .history-actions .small-button { flex: 1; }
}

