:root {
  color-scheme: light;
  --ink: #18302b;
  --muted: #60716d;
  --line: #d8e2df;
  --paper: #ffffff;
  --background: #f3f7f5;
  --accent: #176b58;
  --accent-dark: #105044;
  --error: #9c2f2f;
  --success: #24683d;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--background); line-height: 1.5; }
.site-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 5vw; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); font-weight: 800; text-decoration: none; font-size: 1.1rem; }
.page { width: min(1120px, 90vw); margin: 2rem auto 4rem; }
h1, h2 { line-height: 1.2; margin-top: 0; }
.intro { display: flex; justify-content: space-between; align-items: end; margin-bottom: 1.25rem; }
.intro p, .section-heading p { color: var(--muted); margin-bottom: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 1.25rem; align-items: start; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; box-shadow: 0 8px 30px rgba(20, 60, 50, .05); }
.narrow { max-width: 520px; margin: 8vh auto; }
.stack { display: grid; gap: .7rem; }
label { font-weight: 700; }
input, textarea { width: 100%; border: 1px solid #9aaca7; border-radius: 8px; padding: .72rem .8rem; background: white; color: var(--ink); font: inherit; }
textarea { resize: vertical; }
input:focus, textarea:focus, button:focus, a:focus { outline: 3px solid rgba(23, 107, 88, .3); outline-offset: 2px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-row > div { display: grid; gap: .7rem; }
.button { border: 1px solid transparent; border-radius: 8px; padding: .68rem 1rem; font: inherit; font-weight: 750; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.primary { background: var(--accent); color: white; }
.primary:hover { background: var(--accent-dark); }
.secondary { background: white; color: var(--ink); border-color: #9aaca7; }
.calculation { background: #e9f4f0; border-radius: 8px; padding: .85rem; margin: .3rem 0; }
.muted, small { color: var(--muted); font-weight: 400; }
.alert { padding: .85rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.alert.error { color: var(--error); background: #fff0f0; border: 1px solid #efc5c5; }
.alert.success { color: var(--success); background: #edf8f0; border: 1px solid #c7e4cf; }
.alert ul { margin-bottom: 0; }
.search-form { display: grid; gap: .6rem; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.quote-list { list-style: none; padding: 0; margin: 1.2rem 0 0; border-top: 1px solid var(--line); }
.quote-list li { border-bottom: 1px solid var(--line); }
.quote-list a { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem .25rem; color: var(--ink); text-decoration: none; }
.quote-list a:hover { background: #f6faf8; }
.quote-list span:first-child { display: grid; }
.empty { color: var(--muted); }
.reopened { margin-top: 1.25rem; }
.section-heading { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.3rem 0; }
.details div { background: var(--background); padding: 1rem; border-radius: 8px; }
dt { color: var(--muted); font-size: .9rem; }
dd { margin: .2rem 0 0; font-size: 1.2rem; font-weight: 800; }
.private-note { border-top: 1px solid var(--line); padding-top: 1rem; }
.private-note p { white-space: pre-wrap; }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .field-row, .details { grid-template-columns: 1fr; }
  .section-heading { display: grid; }
  .section-heading .button { width: 100%; }
  .page { width: min(94vw, 680px); margin-top: 1rem; }
  .card { padding: 1.1rem; }
}
