:root {
  color-scheme: light;
  --paper: #f6f5f1;
  --white: #fff;
  --ink: #132d26;
  --muted: #52605a;
  --green: #174c39;
  --dark: #10382c;
  --line: #dfded7;
  --active: #e8eee3;
  --danger: #a22d36;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden], .icons { display: none !important; }
body { margin: 0; min-width: 0; background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--sans); }
h1, h2, h3, p { margin: 0; }
h1, h2, .brand { font-family: var(--serif); }
h1 { font-weight: 700; line-height: 1.05; letter-spacing: -.045em; }
h2 { line-height: 1.2; letter-spacing: -.035em; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: wait; opacity: .62; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #4a816b; outline-offset: 3px; }
button svg, .session-note svg, .gate-foot svg { width: 1.25rem; height: 1.25rem; flex: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.primary, .quiet, .outline, .danger { border: 1px solid transparent; border-radius: 10px; min-height: 44px; padding: 8px 14px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; font-weight: 600; line-height: 1.2; }
.primary { background: var(--green); color: white; }
.primary:hover { background: var(--dark); }
.quiet, .danger { background: transparent; }
.quiet:hover { background: var(--active); }
.outline { background: var(--white); border-color: #315647; }
.outline:hover { background: #edf2eb; }
.danger { color: var(--danger); }
.danger:hover { background: #f8e9e9; }
.danger.filled { background: var(--danger); color: white; }
.danger.filled:hover { background: #7e222a; }
.topbar { border-bottom: 1px solid #d7d6ce; }
.topbar-inner { max-width: 1536px; margin: auto; min-height: 70px; padding: 8px clamp(20px, 3.25vw, 50px); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 700; letter-spacing: -.045em; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.lock-button { position: relative; margin-left: 8px; }
.lock-button::before { position: absolute; left: -11px; top: 6px; bottom: 6px; width: 1px; background: #d7d6ce; content: ""; }
.short-label { display: none; }
.workspace { max-width: 1536px; padding: clamp(48px, 5.8vw, 86px) clamp(20px, 3.25vw, 50px) 34px; margin: auto; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: clamp(30px, 4.4vw, 66px); }
.workspace-heading h1 { font-size: clamp(2.625rem, 5vw, 4.375rem); }
.workspace-heading p { margin-top: 8px; font-size: clamp(1rem, 2vw, 1.65rem); }
#add-button { min-height: 56px; padding-inline: 25px; font-size: 1.125rem; white-space: nowrap; }
#add-button svg { width: 1.5rem; height: 1.5rem; }
.panes { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.2fr); align-items: stretch; gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 18px; background: var(--white); min-height: min(555px, 65vw); }
.list-card { padding: 26px; }
.list-card h2 { margin: 24px 0 14px; font-size: 1.625rem; }
.search { display: flex; align-items: center; position: relative; }
.search svg { position: absolute; width: 24px; height: 24px; left: 14px; color: #47554f; pointer-events: none; }
input:not([type=checkbox]), textarea { width: 100%; min-width: 0; min-height: 44px; padding: 9px 12px; color: var(--ink); border: 1px solid #bcbbb4; background: white; border-radius: 9px; }
input::placeholder, textarea::placeholder { color: #5e6964; opacity: 1; }
.search input { min-height: 54px; border-radius: 13px; padding-left: 47px; font-size: 1.125rem; }
.entries { list-style: none; padding: 0; margin: 0; }
.entries li { border-bottom: 1px solid var(--line); padding: 8px 0; }
.entries li:first-child { padding-top: 0; }
.entry { width: calc(100% + 22px); margin-inline: -11px; border: 0; border-radius: 11px; padding: 12px 15px; background: none; display: grid; align-items: center; grid-template-columns: 54px minmax(0, 1fr) 18px; gap: 18px; text-align: left; }
.entry:hover, .entry[aria-current=true] { background: var(--active); }
.entry svg { width: 18px; height: 18px; color: var(--muted); }
.entry strong, .entry small { display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.entry strong { font: 700 1.425rem/1.16 var(--serif); letter-spacing: -.035em; }
.entry small { color: var(--muted); margin-top: 3px; font-size: 1rem; }
.tile { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 13px; background: #dce6d5; color: var(--ink); font: 700 2rem/1 var(--serif); text-transform: uppercase; }
.tile[data-tone="1"] { background: #e8d2da; }
.tile[data-tone="2"] { background: #efddbf; }
.tile[data-tone="3"] { background: #dce4ee; }
.tile[data-tone="4"] { background: #e3dbeb; }
.detail-card { padding: 28px; }
.detail-head { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; align-items: center; gap: 18px; margin-bottom: 24px; }
.detail-head .tile { width: 72px; height: 72px; font-size: 2.55rem; border-radius: 16px; }
.detail-head h2 { font-size: clamp(1.7rem, 3vw, 2.45rem); overflow-wrap: anywhere; }
.detail-head p { color: var(--muted); font-size: 1.05rem; overflow-wrap: anywhere; }
.detail-fields { margin: 0; }
.detail-row { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; border-top: 1px solid var(--line); padding: 19px 5px; }
.detail-row > div:first-child { min-width: 0; }
.detail-row dt { color: #4b5751; font-size: .925rem; }
.detail-row dd { margin: 2px 0 0; font-size: 1.125rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.detail-row a { color: inherit; text-underline-offset: 3px; }
.field-actions { display: flex; align-items: center; gap: 6px; }
.field-actions button { white-space: nowrap; }
.password-mask { letter-spacing: .19em; }
.password-shown { font-family: ui-monospace, Consolas, monospace; }
.session-note, .gate-foot { display: flex; align-items: center; gap: 9px; margin-top: 30px; font-size: .925rem; }
.subtle { color: var(--muted); }
.list-empty { padding-top: 8px; }
.detail-empty { display: grid; place-content: center; justify-items: center; text-align: center; min-height: 100%; padding: 24px 12px; gap: 12px; }
.detail-empty h2 { font-size: 1.85rem; }
.detail-empty p { max-width: 30ch; }
.detail-empty .gate-mark { margin-bottom: 0; }
.mobile-back { display: none; }
.gate { max-width: 532px; padding: clamp(48px, 8vw, 106px) 20px 30px; margin: auto; }
.gate-card { padding: clamp(22px, 6vw, 42px); background: white; border: 1px solid var(--line); border-radius: 18px; }
.gate-mark { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; background: var(--active); color: var(--green); margin-bottom: 20px; }
.gate-mark svg { width: 26px; height: 26px; }
.gate h1 { font-size: clamp(2rem, 6vw, 2.9rem); margin-bottom: 12px; }
.gate form { margin-top: 24px; }
.gate-foot { justify-content: center; text-align: center; font-size: .875rem; }
label:not(.checkbox) { display: block; font-weight: 650; font-size: .925rem; margin: 15px 0 6px; }
.gate label:first-child { margin-top: 0; }
.password-field { position: relative; }
.password-field input { padding-right: 51px; }
.inside { position: absolute; right: 1px; top: 1px; bottom: 1px; padding: 0; width: 43px; min-height: 0; }
.hint, .problem { margin-top: 8px; font-size: .875rem; color: var(--muted); }
.problem { color: var(--danger); font-weight: 600; }
.full { width: 100%; margin-top: 22px; }
.import-link { margin: 10px 0 -8px; width: 100%; }
dialog { box-sizing: border-box; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: white; padding: 24px clamp(18px, 5vw, 30px); width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 28px); overflow: auto; }
dialog::backdrop { background: #142a23a1; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dialog-head h2 { font-size: 1.9rem; }
.icon-button { width: 44px; padding: 8px; flex: none; }
.optional { font-weight: 400; color: var(--muted); margin-left: 4px; }
textarea { resize: vertical; min-height: 74px; }
.generator { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin: 5px 0 0; }
.generator button { padding-inline: 6px; text-align: left; }
.generator label { display: flex; align-items: center; gap: 7px; margin: 0; }
.generator input { width: 66px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 18px; }
#delete-button { margin-right: auto; padding-inline: 6px; }
.delete-confirm { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.transfer-section { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.transfer-section h3 { font-size: 1.05rem; }
.transfer-section p { margin: 6px 0 12px; }
input[type=file] { display: block; font-size: .9rem; }
.checkbox { display: flex; gap: 9px; align-items: center; min-height: 44px; margin-top: 7px; }
.checkbox input { width: 19px; height: 19px; accent-color: var(--green); }
#import-submit { margin-top: 12px; }
.notice:not(:empty) { position: fixed; z-index: 3; bottom: 18px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 30px); padding: 9px 15px; border-radius: 10px; background: var(--dark); color: white; box-shadow: 0 4px 20px #10251d30; font-size: .925rem; text-align: center; }
@media (max-width: 860px) {
  .list-card, .detail-card { padding: 19px; }
  .entry { gap: 11px; }
  .detail-head { grid-template-columns: 52px minmax(0,1fr) auto; gap: 11px; }
  .detail-head .tile { width: 52px; height: 52px; font-size: 1.875rem; }
  .detail-row { padding-inline: 0; }
}
@media (max-width: 670px) {
  .topbar-inner { min-height: 62px; padding-inline: 16px; }
  .brand { gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .top-actions { gap: 0; }
  .top-actions button { padding-inline: 7px; gap: 5px; font-size: .875rem; }
  .lock-button { margin-left: 5px; }
  .lock-button::before { left: -3px; }
  .wide-label { display: none; }
  .short-label { display: inline; }
  .workspace { padding: 38px 16px 28px; }
  .workspace-heading { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 25px; }
  .workspace-heading h1 { font-size: 2.7rem; }
  #add-button { min-height: 46px; padding-inline: 15px; font-size: 1rem; }
  .panes { display: block; }
  .card { min-height: 0; border-radius: 14px; }
  .detail-card { display: none; }
  .panes[data-mobile-detail=true] .list-card { display: none; }
  .panes[data-mobile-detail=true] .detail-card { display: block; }
  .mobile-back { display: inline-flex; padding-inline: 4px 10px; margin-bottom: 10px; }
  .detail-row { gap: 8px; }
  .detail-row dd { font-size: 1rem; }
  .field-actions button { padding-inline: 8px; }
  .field-actions svg { width: 1rem; height: 1rem; }
  .session-note { margin-top: 20px; font-size: .825rem; }
}

/* The vault chrome follows the evergreen palette and alpine backdrop. */
:root {
  --paper: #e6edf0;
  --ink: #102b2a;
  --muted: #405158;
  --green: #07533a;
  --dark: #07382a;
  --line: #cfd9db;
  --active: #d8ece3;
}
h1, h2, .brand, .entry strong, .tile { font-family: var(--sans); }
body { background: #e6edf0; }
.topbar { position: relative; background: #e9eff1; border-color: #bdc9cd; z-index: 1; }
.topbar-inner { max-width: none; min-height: 64px; padding-inline: clamp(18px, 2.35vw, 36px); }
.brand { letter-spacing: -.04em; gap: 17px; font-size: clamp(1.4rem, 2.1vw, 1.9rem); }
.sidebar { position: fixed; inset: 64px auto 0 0; width: clamp(180px, 17.3vw, 266px); overflow: auto; color: #fff; background: #082f2f; background-image: linear-gradient(180deg,#062b2bf7 0%,#0a3533f5 43%,#123e3dd9 66%,#043632a0 100%), url("./mountains.jpg"); background-position: center, 78% bottom; background-size: cover, auto 52%; background-repeat: no-repeat; }
.side-nav { display: grid; gap: 20px; padding: 52px 13px 28px; }
.side-nav button { padding: 11px 15px 11px 19px; width: 100%; min-height: 52px; border: 1px solid transparent; border-radius: 13px; background: transparent; display: flex; align-items: center; gap: 19px; text-align: left; color: inherit; font-size: .98rem; }
.side-nav button:hover, .side-nav .side-current { background: #317066; }
.side-nav .side-current { font-size: 1.14rem; border-color: #5a9589; }
.side-nav svg { width: 26px; height: 26px; }
.side-secondary { border-top: 1px solid #789894; margin: 0 8px; padding-top: 16px; }
.side-secondary button { padding-left: 9px; gap: 15px; }
.workspace { position: relative; max-width: none; min-height: calc(100svh - 64px); margin: 0 0 0 clamp(180px, 17.3vw, 266px); padding: 60px clamp(18px, 2.05vw, 32px) 30px; background: #edf1f3 linear-gradient(180deg,#dce7ec 0,#eaf0f2 53%,#f0f3f4 100%); }
.workspace::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 370px; background-image: linear-gradient(180deg,#e0e9ed44 0%,transparent 48%,#edf1f3 99%),url("./mountains.jpg"); background-size: cover; background-position: center 44%; pointer-events: none; }
.workspace > * { position: relative; }
.workspace-heading { min-height: 158px; align-items: flex-start; margin-bottom: 22px; }
.workspace-heading h1 { font-size: clamp(2.35rem, 3.85vw, 3.45rem); text-wrap: balance; letter-spacing: -.05em; }
.workspace-heading p { font-size: clamp(1rem, 1.55vw, 1.25rem); color: #243a41; }
.top-actions { position: absolute; right: 0; top: -35px; gap: 14px; }
.top-actions button { min-height: 46px; }
#transfer-button { border-color: #698590; background: #f4f7f9bc; }
#transfer-button:hover { background: #fff; }
.lock-button { margin: 0; background: var(--green); color: white; padding-inline: 20px; }
.lock-button:hover { background: var(--dark); }
.lock-button::before { display: none; }
.panes { grid-template-columns: minmax(0,.82fr) minmax(0,1.2fr); }
.card { border-radius: 18px; background: #fcfdfef2; border-color: #fdfefe; min-height: clamp(445px, 60.6vh, 620px); box-shadow: 0 1px 0 #122d3410; }
.list-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 16px; }
.list-card, .detail-card { padding: 24px; }
.list-card h2 { margin: 0; font-size: clamp(1.2rem, 2vw, 1.65rem); font-weight: 700; }
#add-button { min-height: 46px; font-size: 1rem; padding-inline: clamp(12px, 1.5vw, 23px); white-space: nowrap; box-shadow: 0 2px 2px #0e3d3030; }
.search { margin-bottom: 18px; }
.search input { min-height: 50px; border-color: #9eafb4; background: #f7f9fa; }
.entries li { padding-block: 8px; }
.entry { width: calc(100% + 14px); margin-inline: -7px; padding: 11px 11px 11px 16px; border-left: 5px solid transparent; min-height: 79px; }
.entry[aria-current=true] { border-left-color: #0e8055; background: #d2e9df; }
.entry strong { font-size: clamp(1.1rem, 1.85vw, 1.55rem); letter-spacing: -.04em; }
.entry small { font-size: clamp(.88rem, 1.35vw, 1.08rem); }
.tile, .tile[data-tone] { background: #f7f9fa; border: 1px solid #c5d0d3; box-shadow: 0 2px 3px #22343a11; border-radius: 14px; color: #0b6948; }
.tile[data-tone="1"] { color: #76502f; }
.tile[data-tone="3"] { color: #294f73; }
.tile[data-tone="4"] { color: #645176; }
.detail-head { margin-bottom: 22px; }
.detail-head h2 { font-weight: 710; font-size: clamp(1.75rem, 3vw, 2.45rem); }
.detail-head .tile { border-radius: 17px; }
.detail-fields { border: 1px solid #e3e9eb; border-radius: 15px; padding: 0 12px; }
.detail-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 12px 16px; }
.detail-row > svg { width: 24px; height: 24px; }
.detail-row:first-child { border-top: 0; }
.field-content { min-width: 0; }
.detail-row dt { color: #334047; }
.detail-row dd { color: #132225; }
.detail-row a { color: #075139; }
.notes-row { grid-template-columns: 26px minmax(0,1fr); }
.notes-row .field-actions { display: none; }
.notes-row dd { min-height: 70px; padding: 9px 12px; margin-top: 5px; background: #eef2f4; border: 1px solid #d1dcdf; border-radius: 10px; }
.outline { border-color: #8e9ca2; background: #fbfdfd; }
.session-note { margin: 28px 0 0 8px; }
.gate { position: relative; }
body:has(#workspace[hidden]) { background-color: #e6edf0; background-image: linear-gradient(180deg,#e6edf085 0%,#e6edf055 64%,#e6edf0 100%),url("./mountains.jpg"); background-size: auto max(680px,72vh); background-position: center 64px; background-repeat: no-repeat; }
@media (max-width: 1180px) {
  .workspace { padding-top: 80px; }
  .workspace-heading { min-height: 135px; }
  .top-actions { top: -59px; }
  .side-nav button { font-size: .9rem; }
  .side-nav .side-current { font-size: 1.05rem; }
}
@media (max-width: 950px) {
  .sidebar { width: 168px; }
  .workspace { margin-left: 168px; }
  .side-nav { padding-inline: 8px; }
  .side-nav button { gap: 10px; }
  .panes { grid-template-columns: minmax(0,.76fr) minmax(0,1.24fr); gap: 12px; }
  .list-card, .detail-card { padding: 16px; }
  .detail-row { grid-template-columns: minmax(0,1fr) auto; gap: 7px; }
  .detail-row > svg { display: none; }
  .notes-row { grid-template-columns: minmax(0,1fr); }
  .field-actions button { padding-inline: 8px; }
}
@media(max-width: 740px) {
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .card { min-height: 400px; }
}
@media (max-width: 670px) {
  .topbar-inner { min-height: 58px; }
  .workspace { min-height: calc(100svh - 58px); padding: 22px 14px 24px; }
  .workspace::before { height: 260px; background-position: 68% center; }
  .workspace-heading { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 23px; min-height: auto; margin-bottom: 25px; }
  .workspace-heading h1 { font-size: clamp(2rem, 9.5vw, 2.6rem); }
  .workspace-heading p { font-size: .98rem; }
  .top-actions { position: static; justify-content: flex-end; gap: 8px; }
  .top-actions button { min-height: 44px; padding-inline: 11px; }
  .card { min-height: auto; }
  .list-heading { gap: 6px; margin-bottom: 12px; }
  #add-button { min-height: 44px; padding-inline: 11px; }
  #add-button svg { width: 1.1rem; height: 1.1rem; }
  .search { margin-bottom: 10px; }
  .list-card h2 { font-size: 1.22rem; }
  .detail-row dd { font-size: .98rem; }
  .detail-fields { padding-inline: 8px; }
  .session-note { margin: 20px 0 0; }
}

.sidebar { background: linear-gradient(180deg,#082f2f 10%,#113f3d 72%,#062c2b 100%); }
.sidebar::before { position: absolute; content: ""; inset: auto 0 0; height: 52%; background: linear-gradient(180deg,#103b3b44 0%,#07333180 49%,#042727e0 100%),url("./mountains.jpg") 45% bottom / auto 114% no-repeat; mask-image: linear-gradient(to bottom,transparent 0%,black 48%); pointer-events: none; }
.side-nav { position: relative; }
.workspace::before { background-position: center 88%; }
.workspace-heading p { max-width: 42ch; }
.entry:hover:not([aria-current=true]) { background: transparent; }
@media (hover: hover) {
  .entry:hover:not([aria-current=true]) { background: #edf2f0; }
}
@media (min-width: 1181px) {
  .workspace { padding-inline: 22px 16px; }
  .workspace-heading { padding-left: 18px; }
  .top-actions { right: 14px; }
  .top-actions button { min-height: 49px; padding-inline: 22px; font-size: 1.05rem; }
  .entry { grid-template-columns: 70px minmax(0,1fr) 18px; gap: 23px; min-height: 95px; }
  .entry .tile { width: 70px; height: 70px; font-size: 2.35rem; }
  .detail-head { grid-template-columns: 90px minmax(0,1fr) auto; gap: 22px; }
  .detail-head .tile { width: 90px; height: 90px; font-size: 3.25rem; }
  .detail-head .outline { padding-inline: 24px; min-height: 48px; }
  .detail-row dd { font-size: 1.22rem; }
  .detail-row dt { font-size: 1rem; }
  .detail-row { padding-block: 18px; }
  #add-button { padding-inline: 22px; font-size: 1.125rem; }
  .field-actions .outline:not(.icon-button) { padding-inline: 19px; }
  .session-note { margin-left: 18px; font-size: 1rem; }
}
@media (max-width: 850px) {
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .workspace { padding-inline: 16px; }
  .panes { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); }
}
@media (max-width: 670px) {
  .workspace { padding-inline: 14px; }
  .workspace::before { background-image: linear-gradient(180deg,#e0e9ed44 0%,#e5edf19e 57%,#edf1f3 100%),url("./mountains.jpg"); background-position: 68% center; }
  .workspace-heading p { max-width: 32ch; }
}

.workspace-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; margin-top: 26px; }
.workspace-footer .session-note { margin-top: 0; }
.sync-note { font-size: .9rem; color: var(--muted); }
@media (max-width: 670px) {
  .workspace-footer { align-items: flex-start; flex-direction: column; margin-top: 20px; }
}
