:root {
  --blue: #00308A; --blue-2: #25469C; --green: #55BE00; --bg: #EEF2FA; --ink: #0B1D45; --muted: #4F5B78;
  --on-blue-muted: #B9C6E8; --on-blue-soft: #DCE4F5; --progress: #DDF5C8; --ok: #2E7D00; --line: #E3E8F3;
  --tag: #E3E9F6; --danger: #8A4A00; --danger-bg: #FCEBD9; --dash: #9FB0D6;
  --display: "Bricolage Grotesque", system-ui, sans-serif; --body: Onest, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: var(--blue); }
a:hover { color: #001E5C; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }

/* brand mark */
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; text-decoration: none; color: inherit; }
.mark { width: 36px; height: 36px; border-radius: 11px; background: var(--green); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mark svg { stroke: var(--blue); }
.mark.on-light { background: var(--blue); }
.mark.on-light svg { stroke: var(--green); }

/* blue panels with the green curve */
.panel { position: relative; overflow: hidden; background: var(--blue); color: #fff; padding: 40px 96px 48px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.panel::after { content: ""; position: absolute; top: -280px; right: -360px; width: 420px; height: 1800px; border-radius: 50%; background: var(--green); pointer-events: none; }
.panel > * { position: relative; z-index: 1; }
.panel a { color: var(--green); }
.full { min-height: 100vh; }
.big { font-family: var(--display); font-weight: 700; font-size: clamp(44px, 7vw, 76px); line-height: 0.96; letter-spacing: -0.035em; max-width: 12ch; }
.lead { font-size: 19px; color: var(--on-blue-soft); max-width: 34em; margin: 0; }

/* share page */
.split { display: flex; flex-wrap: wrap; min-height: 100vh; }
.split > .panel { flex: 1 1 400px; }
.split > main { flex: 999 1 540px; min-width: 0; padding: 40px 48px 48px; display: flex; flex-direction: column; gap: 32px; }
.greet { font-size: 17px; color: var(--on-blue-muted); }
.folder-title { font-size: clamp(44px, 6vw, 72px); line-height: 0.96; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.can { color: var(--on-blue-soft); }
.note { display: flex; gap: 14px; align-items: flex-start; max-width: 420px; }
.avatar { flex: 0 0 40px; height: 40px; border-radius: 50%; background: var(--green); color: var(--blue); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.note small { display: block; color: var(--on-blue-muted); font-size: 14px; }
.countdown { font-family: var(--display); font-weight: 700; font-size: 48px; line-height: 1; letter-spacing: -0.03em; color: var(--green); }
.segments { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 360px; }
.segments i { height: 8px; border-radius: 4px; background: var(--blue-2); }
.segments i.on { background: var(--green); }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 15px; }
.crumbs span { font-weight: 600; }
section { display: flex; flex-direction: column; gap: 10px; }
section h2 { font-size: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.folder-link { background: #fff; border-radius: 16px; padding: 16px 18px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.row { position: relative; overflow: hidden; background: #fff; border-radius: 16px; padding: 12px 12px 12px 18px; display: flex; align-items: center; gap: 14px; min-height: 64px; }
.row .fill { position: absolute; inset: 0 auto 0 0; background: var(--progress); width: 0; transition: width .2s; }
.row > :not(.fill) { position: relative; }
.tag { background: var(--blue); color: #fff; border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 600; flex: none; }
.tag.soft { background: var(--tag); color: var(--blue); }
.grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub { font-size: 13px; color: var(--muted); }
.status { font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; background: var(--bg); color: var(--blue); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.danger { background: var(--danger-bg); color: var(--danger); }
.btn:hover { filter: brightness(0.96); }
.drop { background: #fff; border: 2px dashed var(--dash); border-radius: 24px; padding: 28px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; cursor: pointer; }
.drop.over { border-color: var(--blue); background: #F7F9FE; }
.drop .icon { width: 56px; height: 56px; border-radius: 50%; background: var(--progress); display: flex; align-items: center; justify-content: center; flex: none; }
.drop strong { font-family: var(--display); font-size: 24px; letter-spacing: -0.02em; display: block; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.done-msg { background: var(--progress); border-radius: 14px; padding: 12px 16px; font-weight: 600; }
footer.small { font-size: 14px; color: var(--muted); }

@media (max-width: 640px) {
  .panel { padding: 28px 64px 32px 20px; }
  .split > main { padding: 24px 16px 40px; }
  .countdown { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) { .row .fill { transition: none; } }

/* console */
.console { min-height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 28px; }
.search { flex: 0 1 420px; }
.search input, .field input, .field textarea, .pop input, .pop select, .inline-form input, .box textarea {
  width: 100%; font: inherit; font-size: 15px; border: 1.5px solid #C3CDE3; background: #fff; border-radius: 12px; padding: 10px 14px; min-height: 44px; color: var(--ink);
}
.search input { border: 0; border-radius: 999px; }
.console-body { display: flex; flex-wrap: wrap; gap: 24px; padding: 0 28px 28px; align-items: flex-start; }
.sidebar { flex: 1 1 220px; max-width: 280px; display: flex; flex-direction: column; gap: 2px; }
.sidebar hr { border: 0; height: 1px; background: #DCE3F1; margin: 10px 0; width: 100%; }
.tree-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); font-size: 15px; min-height: 40px; }
.tree-item:hover { background: #E3E9F6; }
.tree-item.current { background: #fff; font-weight: 600; }
.grow-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.card { flex: 999 1 600px; min-width: 0; background: #fff; border-radius: 28px; padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.muted-links a { color: var(--muted); }
.crumbs.muted-links { color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.actions.stack { flex-direction: column; align-items: stretch; }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.pop { position: absolute; right: 0; top: 50px; z-index: 5; background: #fff; border-radius: 16px; box-shadow: 0 12px 32px rgba(0, 48, 138, 0.18); padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 280px; }
.pop label, .inline-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.pop form { display: flex; flex-direction: column; gap: 8px; }
.shared-strip { background: var(--bg); border-radius: 20px; padding: 16px 18px; }
.strip-title { font-size: 17px; font-family: var(--body); font-weight: 600; letter-spacing: 0; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.person-card { background: #fff; border-radius: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.card .person-card { background: var(--bg); }
.shared-strip .person-card { background: #fff; }
.initials { flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--blue); color: var(--green); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.bar { display: block; height: 4px; border-radius: 2px; background: #DCE3F1; margin-top: 4px; }
.bar span { display: block; height: 4px; border-radius: 2px; background: var(--ok); }
.drop.compact { padding: 16px 20px; }
.drop.compact strong { font-size: 20px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; min-height: 44px; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.table-wrap { overflow-x: auto; }
table.files { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 680px; }
table.files th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 500; padding: 0 10px 10px 0; }
table.files td { border-top: 1px solid var(--line); padding: 8px 10px 8px 0; vertical-align: middle; }
.file-name { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--ink); text-decoration: none; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
td .menu { display: inline-block; }
.switch { border: 0; background: transparent; padding: 0; min-height: 44px; display: inline-flex; align-items: center; gap: 10px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left; }
.switch .track { width: 40px; height: 24px; border-radius: 12px; background: #C3CDE3; position: relative; flex: none; }
.switch .track span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-pressed="true"] .track { background: var(--ok); }
.switch[aria-pressed="true"] .track span { left: 19px; }
.share-form { display: flex; flex-direction: column; gap: 22px; max-width: 640px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.label, legend { font-size: 15px; font-weight: 600; }
.rows { display: flex; flex-direction: column; gap: 8px; }
.recipient { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 16px; padding: 10px 8px 10px 12px; }
.recipient .grow { gap: 6px; }
.r-email { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.recipient input[name=name] { border: 0; border-radius: 10px; }
.choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input, .perm input { position: absolute; opacity: 0; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--bg); font-weight: 600; font-size: 14px; cursor: pointer; }
.chip input:checked + span, .perm input:checked + span { background: var(--blue); color: #fff; }
.chip input:focus-visible + span, .perm input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 3px; }
.perm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.perm span { display: flex; flex-direction: column; gap: 2px; border-radius: 14px; padding: 10px 12px; min-height: 64px; background: var(--bg); cursor: pointer; }
.perm small { font-size: 12px; color: var(--muted); }
.perm input:checked + span small { color: var(--on-blue-muted); }
.date-pick { display: none; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; max-width: 280px; }
.choices:has(input[value=date]:checked) .date-pick { display: flex; }
.date-pick input { font: inherit; border: 1.5px solid #C3CDE3; border-radius: 12px; padding: 8px 12px; min-height: 44px; }
.big-btn { min-height: 52px; font-size: 16px; }
.link-btn { background: transparent; text-decoration: underline; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.box { background: var(--bg); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.box .chip span, .box .perm span { background: #fff; }
.activity { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.card .row { background: var(--bg); text-decoration: none; color: var(--ink); }
.copy { font-family: ui-monospace, monospace; font-size: 13px !important; }
@media (max-width: 640px) {
  .console-body { padding: 0 12px 20px; }
  .topbar { padding: 14px 16px; }
  .card { padding: 20px 16px; border-radius: 20px; }
  .perm-grid { grid-template-columns: 1fr; }
  .sidebar { max-width: none; }
}
.row-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
@media (max-width: 640px) {
  .row { flex-wrap: wrap; }
  .row .grow { flex: 1 1 calc(100% - 70px); }
  .row .btn { flex: 1 1 auto; }
}
