:root {
  color-scheme: light;
  --ink: #18322b;
  --muted: #71827b;
  --green: #176b50;
  --green-dark: #10533e;
  --mint: #e2f1e9;
  --paper: #f4f7f5;
  --line: #e6ece8;
  --card: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

.app-shell {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 20px 0 28px;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  font-size: 22px;
  font-weight: 750;
}

.app-header h1 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.eyebrow { margin: 0 0 5px; color: var(--green); font-size: 10px; font-weight: 750; letter-spacing: .12em; }
.app-header .eyebrow { margin-bottom: 1px; }
.status-dot { width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: #59ad79; box-shadow: 0 0 0 4px #e0f0e5; }

.welcome-card {
  padding: 25px 24px;
  border-radius: 20px;
  background: linear-gradient(125deg, #e1f1e8, #f0f6e9 70%, #f8f7e9);
}

.welcome-card h2 { max-width: 430px; margin: 0; font-size: clamp(23px, 6vw, 31px); line-height: 1.15; letter-spacing: -.04em; }
.welcome-card > p:last-child { margin: 10px 0 0; color: #50685e; }

.section-nav {
  display: flex;
  gap: 5px;
  margin: 17px 0;
  padding: 5px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  scrollbar-width: none;
}

.section-nav::-webkit-scrollbar { display: none; }
.section-nav a { flex: 1 0 auto; padding: 9px 11px; border-radius: 10px; color: #60736b; text-align: center; text-decoration: none; font-size: 13px; font-weight: 650; }
.section-nav a:hover, .section-nav a:focus-visible, .section-nav a[href="#brevets"] { background: var(--mint); color: var(--green-dark); outline: none; }

.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.content-card { min-width: 0; padding: 19px; border: 1px solid var(--line); border-radius: 17px; background: var(--card); scroll-margin-top: 14px; }
.content-card h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.content-card > p:last-child, .card-description { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.brevet-card { grid-column: 1 / -1; }
.brevet-card h2 { font-size: 21px; }
.save-status { min-height: 20px; margin: 15px 0 8px; color: var(--green); font-size: 12px; }

fieldset { display: grid; gap: 9px; margin: 0; padding: 0; border: 0; }
fieldset:disabled { opacity: .65; }
.check-row { position: relative; display: flex; min-height: 54px; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfb; font-size: 14px; font-weight: 600; cursor: pointer; }
.check-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.checkmark { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border: 1.5px solid #b8c8bf; border-radius: 7px; background: white; }
.check-row input:checked + .checkmark { border-color: var(--green); background: var(--green); }
.check-row input:checked + .checkmark::after { width: 6px; height: 10px; border: solid white; border-width: 0 2px 2px 0; content: ""; transform: translateY(-1px) rotate(45deg); }
.check-row input:focus-visible + .checkmark { outline: 3px solid #9dcdb6; outline-offset: 2px; }
.check-row:has(input:checked) { border-color: #b9ddc8; background: #f3faf5; }

button { justify-self: start; margin-top: 5px; padding: 9px 12px; border: 0; border-radius: 9px; background: #f0f3f1; color: #4e6258; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
button:hover, button:focus-visible { background: #e4ebe6; outline: 2px solid #abc9b7; }
footer { padding: 19px 0 0; color: #8b9992; text-align: center; font-size: 11px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

@media (max-width: 480px) {
  .app-shell { width: min(100% - 24px, 760px); padding-top: 14px; }
  .welcome-card { padding: 21px 19px; border-radius: 17px; }
  .section-nav a { padding: 9px 10px; }
  .content-grid { grid-template-columns: 1fr; gap: 10px; }
  .brevet-card { grid-column: auto; }
  .content-card { padding: 17px; }
}
