:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #203631;
  background: #f5f5ef;
  --ink: #173e37;
  --muted: #566961;
  --line: #dce2d9;
  --paper: #fffefa;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { opacity: .58; cursor: wait; }
:focus-visible { outline: 3px solid #458675; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.07; letter-spacing: -.05em; overflow-wrap: anywhere; }
h2 { font-size: 1.35rem; letter-spacing: -.035em; }
small { color: var(--muted); }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand, .top-link { display: inline-flex; align-items: center; gap: 12px; }
.brand { font-weight: 730; letter-spacing: -.025em; }
.top-link { font-size: .88rem; font-weight: 600; color: var(--muted); }
.top-link:hover { color: var(--ink); }
.top-link .icon { width: 17px; }
.main { flex: 1; padding-block: clamp(36px, 7vh, 84px); }
.welcome { display: grid; grid-template-columns: 1.14fr 1fr; min-height: 502px; }
.welcome-content, .surface {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(22px, 4vw, 46px);
  min-width: 0;
}
.welcome-content { padding: clamp(30px, 5vw, 64px); border-radius: 20px 0 0 20px; }
.welcome h1 { font-size: clamp(3rem, 6vw, 5rem); margin: 19px 0; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #42665b; font-weight: 720; font-size: .71rem; letter-spacing: .15em; }
.eyebrow > span, .art-bottom > span { width: 7px; height: 7px; border-radius: 50%; background: #639482; }
.intro { color: var(--muted); line-height: 1.6; max-width: 345px; }
.art {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  background: radial-gradient(ellipse at 55% 43%, #29554a, #173e37 75%);
  color: #d6e7cb;
  border-radius: 0 20px 20px 0;
  padding: 27px;
}
.art-caption { display: flex; justify-content: space-between; align-items: center; font-size: .67rem; letter-spacing: .13em; }
.art-caption > :first-child { border: 1px solid #77998b; border-radius: 7px; padding: 6px 8px; }
.drawing { width: min(100%, 360px); margin: auto; }
.art-bottom { display: flex; align-items: center; gap: 8px; font-size: .83rem; border-top: 1px solid #52746a; padding-top: 17px; }
.access-form { margin-top: 26px; max-width: 400px; }
label { display: block; font-size: .88rem; font-weight: 660; margin-bottom: 8px; }
.field { position: relative; }
input {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  color: var(--ink);
  background: #fcfdf8;
  border: 1px solid #cbd7cc;
  border-radius: 10px;
  padding: 10px 13px;
}
.field input { padding-right: 43px; }
.field-icon { position: absolute; left: 13px; top: 14px; color: #5c786f; pointer-events: none; }
.field-icon + input { padding-left: 42px; }
input[type=file] { padding: 6px; font-size: .88rem; }
input::file-selector-button { background: #eaf0e9; color: var(--ink); border: 0; border-radius: 6px; padding: 8px; margin-right: 10px; cursor: pointer; }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.icon-button:hover { background: #eaf0e9; }
.reveal { position: absolute; top: 6px; right: 7px; }
.primary, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 9px;
  min-height: 40px;
  font-weight: 650;
}
.primary {
  width: 100%;
  justify-content: space-between;
  min-height: 49px;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  padding: 10px 14px;
}
.primary:hover:not(:disabled) { background: #245347; }
.access-form > .primary { margin-top: 12px; }
.secondary { color: var(--ink); background: #fffefa; border: 1px solid #cbd7cc; font-size: .88rem; padding: 7px 12px; }
.secondary:hover:not(:disabled) { background: #eef3eb; }
.text-button { border: 0; background: transparent; color: #246453; padding: 6px 0; font-size: .88rem; text-decoration: underline; text-underline-offset: 3px; }
.message { font-size: .88rem; line-height: 1.45; color: #246453; overflow-wrap: anywhere; }
.message:not(:empty) { margin-top: 12px; }
.message.error { color: #a22e29; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.section-head h1, .narrow h1 { margin-top: 10px; }
.narrow { max-width: 525px; margin-inline: auto; }
.dashboard { display: grid; grid-template-columns: 1.08fr 1fr; gap: 20px; margin-top: 24px; align-items: start; }
.hint { color: var(--muted); line-height: 1.5; font-size: .87rem; margin-top: 7px; }
.create-form { display: grid; gap: 17px; margin-top: 22px; }
.create-form .message:empty { display: none; }
.create-form .message { margin: 0; }
.success { background: #eaf3e8; padding: 14px; margin-top: 17px; border-radius: 10px; overflow-wrap: anywhere; }
.success > p { font-size: .88rem; margin: 8px 0; }
.success .text-button { margin-left: 10px; }
.list { margin-top: 19px; }
.empty { color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; }
.row { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.row-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; }
.row-actions { display: flex; gap: 8px; }
.badge { background: #eaf2e8; color: #356653; padding: 9px; border-radius: 9px; display: inline-flex; }
.draft { color: #805829; }
.footer { border-top: 1px solid var(--line); min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .8rem; }
.footer > span:last-child { display: inline-flex; align-items: center; gap: 6px; }
.footer .icon { width: 17px; }
dialog { width: min(1080px, 96vw); padding: 0; border: 0; border-radius: 12px; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #10261ed4; }
.preview-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.preview-head strong { flex: 1; overflow-wrap: anywhere; }
#preview-content { display: grid; place-items: center; background: #e8ece8; min-height: 35vh; }
#preview-content img { display: block; max-width: 100%; max-height: 75vh; object-fit: contain; }
#preview-content canvas { display: block; max-width: 100%; max-height: 74vh; object-fit: contain; background: #fff; }
.pdf-controls { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px; border-top: 1px solid var(--line); }
.preview-message { text-align: center; color: var(--muted); padding: 24px; }

@media (max-width: 760px) {
  .shell { width: calc(100% - 32px); }
  .top-inner { min-height: 65px; }
  .brand { gap: 7px; }
  .brand img { width: 32px; height: 32px; }
  .top-link { font-size: .78rem; gap: 4px; }
  .welcome, .dashboard { grid-template-columns: 1fr; }
  .welcome-content { border-radius: 17px 17px 0 0; }
  .art { border-radius: 0 0 17px 17px; padding: 18px; }
  .drawing { max-height: 210px; }
  .section-head { align-items: flex-start; flex-wrap: wrap; }
  .row { flex-wrap: wrap; }
  .row-actions { flex-basis: 100%; }
}
