@font-face {
  font-family: "Noto Sans Georgian";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/noto-sans-georgian-georgian-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0589, U+10A0-10FF, U+1C90-1CBA, U+1CBD-1CBF, U+205A, U+2D00-2D2F, U+2E31;
}
@font-face {
  font-family: "Noto Sans Georgian";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/noto-sans-georgian-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
* { box-sizing: border-box; }
:root {
  color-scheme: light;
  font-family: "Noto Sans Georgian", "Segoe UI", "DejaVu Sans", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.65;
  --canvas: #f4f5ef;
  --surface: #fff;
  --border: #d8ded4;
  --ink: #142d28;
  --muted: #40554c;
  --label: #55695f;
  --faint: #66786f;
  --brand: #205944;
  --brand-hover: #194734;
  --ok: #1b7a46;
  --warn: #8f5a00;
  --danger: #9e231c;
}
body { margin: 0; }
.frame { width: min(920px, calc(100% - 40px)); margin-inline: auto; }
header { background: #fcfcf8; border-bottom: 1px solid var(--border); }
.brand { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 750; }
.mark { width: 20px; height: 20px; border: 2px solid #286951; transform: skew(-13deg) rotate(-9deg); }
.intro { padding: 16px 0 12px; }
h1, h2, p { margin: 0; }
h1 { line-height: 1.2; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
.intro p { color: var(--muted); }
label { display: block; font-size: .9rem; font-weight: 700; margin-bottom: 8px; }
.controls { display: flex; gap: 10px; }
input, button { font: inherit; min-height: 52px; border-radius: 8px; padding: 10px 14px; }
input { flex: 1; min-width: 0; background: var(--surface); color: inherit; border: 1px solid #869b8e; font-variant-numeric: tabular-nums; }
button {
  color: white;
  background: var(--brand);
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  transition: background-color .12s ease-out, border-color .12s ease-out;
}
button:hover { background: var(--brand-hover); }
button:active:not(:disabled) { background: #143a2c; }
button:disabled { opacity: .65; cursor: progress; }
:focus-visible { outline: 3px solid #257963; outline-offset: 3px; }
#message { margin-top: 8px; }
#message:empty { display: none; }
#report { padding-bottom: 65px; }
#property-fields { margin: 0; line-height: 1.45; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
:is(#property-fields, dl.report-fields) > div {
  display: grid;
  grid-template-columns: minmax(9rem, 15rem) minmax(0, 1fr);
  gap: 2px 20px;
  padding: 8px clamp(10px, 2vw, 18px);
}
#property-fields > div + div { border-top: 1px solid #edf0e9; }
dt { color: var(--muted); font-weight: 700; }
dd { margin: 0; overflow-wrap: anywhere; }
:is(#property-fields, dl.report-fields) :is(dt, dd) { line-height: 1.45rem; }
:is(#property-fields, dl.report-fields) dt { color: var(--label); font-size: .875rem; font-weight: 500; }
dd iframe { display: block; width: 100%; aspect-ratio: 16 / 9; min-height: 210px; border: 0; border-radius: 8px; }
dd img { display: block; max-height: 180px; object-fit: contain; object-position: left center; max-width: 100%; height: auto; border-radius: 8px; }
a { color: #195a44; text-underline-offset: 3px; }

.brand-link, #account-nav, .actions, .report-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.brand-link { color: inherit; text-decoration: none; }
#account-nav { font-size: .9rem; margin-inline-start: auto; }
#account-nav button { min-height: 36px; padding-block: 4px; }
.account-menu { position: relative; min-width: 0; }
.account-menu > summary {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.account-menu > summary::before { --icon: url(/icons/circle-user.svg); width: 1.35em; height: 1.35em; }
.account-menu > summary bdi {
  display: inline-block;
  max-width: min(24ch, 42vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.account-panel {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: 2;
  width: min(300px, calc(100vw - 40px));
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgb(20 45 40 / .12);
}
.account-profile { margin: 0 0 12px; }
.account-profile dt { font-size: .8rem; }
.account-profile dd + dt { margin-top: 8px; }
.account-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.action-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-inline-end: .45em;
  vertical-align: -.125em;
}
.controls button .action-icon, #save-report .action-icon { filter: invert(1); }
.report-toolbar { margin-bottom: 12px; }
.workspace { padding-block: 32px 64px; }
.workspace > * + * { margin-top: 16px; }
.workspace h1 { font-size: clamp(1.55rem, 4vw, 2.15rem); overflow-wrap: anywhere; }
.panel, dialog, .list-rows, dl.report-fields {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.panel { padding: 16px; }
.stack { display: grid; gap: 12px; }
.auth-form { max-width: 420px; padding: clamp(16px, 5vw, 32px); margin: 12px auto; }
.auth-form label, .list-create label { margin: 0; }
.auth-form input, .list-create input, .feedback input {
  display: block;
  width: 100%;
  min-height: 40px;
  margin-top: 4px;
  padding-block: 6px;
}
.list-create { margin-top: 12px; }
.list-create button { justify-self: start; }
.workspace button, dialog button, .report-toolbar button { min-height: 40px; padding-block: 6px; }
.secondary, .danger { background: var(--surface); color: var(--ink); border-color: var(--border); }
.secondary:hover { background: #eff3ef; }
.secondary:active:not(:disabled) { background: #e3eae5; }
.danger { color: var(--danger); }
.danger:hover { background: #fff1ef; }
.danger:active:not(:disabled) { background: #ffe3df; }
.muted { color: var(--muted); font-size: .9rem; }
.feedback { color: var(--danger); overflow-wrap: anywhere; }
.feedback.success { color: var(--brand); }
.feedback:empty { display: none; }
.visibility { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; }
.visibility img { width: 16px; height: 16px; }
.list-rows { list-style: none; padding: 0; }
.list-rows li { padding: 10px 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.list-rows li + li { border-top: 1px solid var(--border); }
.list-rows li > details { width: 100%; }
summary { display: flex; align-items: center; gap: .5em; list-style: none; cursor: pointer; font-weight: 650; }
summary::-webkit-details-marker { display: none; }
summary::after {
  --icon: url(/icons/chevron-down.svg);
  width: 1.2em;
  height: 1.2em;
  margin-inline-start: auto;
  transition: transform .15s ease-out;
}
details[open] > summary::after { transform: rotate(180deg); }
summary time { margin-inline-start: .25em; }
summary .action-icon { margin-inline-end: 0; }
.shared-report { padding-top: 12px; }
.report-fields { margin: 0; line-height: 1.45; }
.report-fields > div + div { border-top: 1px solid var(--border); }
:is(#property-fields, dl.report-fields) > div:has(.boundary-diagram) {
  grid-template-columns: minmax(0, 1fr);
}
.boundary-diagram {
  width: calc(360px * 480 / 280);
  max-height: 360px;
}
/* Icons drawn with a mask take the text color. Each rule sets --icon and a size. */
.status::before, #message[data-state]::before, .account-menu > summary::before,
summary::after, a[target="_blank"]::after {
  content: "";
  display: inline-block;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
a[target="_blank"]::after { --icon: url(/icons/external-link.svg); width: .8em; height: .8em; margin-inline-start: .3em; }
/* The text never changes. An icon and a color are added in front of it. */
.status::before, #message[data-state]::before { width: 1.125em; height: 1.125em; margin-inline-end: .4em; vertical-align: -.22em; }
.status-ok::before { --icon: url(/icons/circle-check.svg); color: var(--ok); }
.status-yes::before { --icon: url(/icons/circle-check.svg); color: var(--label); }
.status-no::before { --icon: url(/icons/circle-minus.svg); color: var(--label); }
.status-risk { color: var(--danger); font-weight: 600; }
.status-risk::before { --icon: url(/icons/circle-alert.svg); }
.status-unverified { color: var(--warn); }
.status-unverified::before { --icon: url(/icons/circle-help.svg); }
.no-data { color: var(--faint); }
#message[data-state]:not(:empty) { display: flex; align-items: flex-start; }
#message[data-state]::before { margin-top: .26em; }
#message[data-state="busy"]::before { --icon: url(/icons/loader-circle.svg); animation: spin .9s linear infinite; }
#message[data-state="error"] { color: var(--danger); }
#message[data-state="error"]::before { --icon: url(/icons/circle-alert.svg); }
@keyframes spin { to { transform: rotate(360deg); } }
dialog {
  color: var(--ink);
  width: min(480px, calc(100% - 32px));
  padding: 20px;
  max-height: calc(100dvh - 32px);
}
dialog > * + * { margin-top: 12px; }
dialog::backdrop { background: rgb(16 32 25 / .45); }
dialog .list-rows { max-height: 24vh; overflow: auto; margin: 0; }
dialog .list-rows:empty { display: none; }
dialog .panel { padding: 12px 0 0; border-width: 1px 0 0; border-radius: 0; background: none; }
.choice { display: flex; width: 100%; cursor: pointer; align-items: center; gap: 9px; margin: 0; }
.choice input { flex: none; min-height: 0; accent-color: var(--brand); }
@media (min-width: 511px) {
  .actions .danger { margin-inline-start: auto; }
}
@media (max-width: 510px) {
  .controls { flex-direction: column; }
  :is(#property-fields, dl.report-fields) > div { grid-template-columns: minmax(0, 1fr); }
  .brand { min-height: 68px; height: auto; padding-block: 10px; flex-wrap: wrap; }
  .workspace button, dialog button, .report-toolbar button, #account-nav button, .account-menu > summary,
  .auth-form input, .list-create input, .feedback input { min-height: 44px; }
  .account-actions a, .workspace > a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  #message[data-state="busy"]::before { animation: none; }
  summary::after { transition: none; }
}
@media (forced-colors: active) {
  .status::before, #message[data-state]::before, .account-menu > summary::before,
  summary::after, a[target="_blank"]::after { forced-color-adjust: none; background: CanvasText; }
}
