:root {
  font-family: Inter, system-ui, sans-serif;
  color: #182b2d;
  background: #f2f6f5;
  color-scheme: light;
  --navy: #102d33;
  --accent: #096259;
  --accent-strong: #064c45;
  --accent-soft: #e6f2ee;
  --muted: #4e6364;
  --line: #d6e2de;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
[hidden] { display: none !important; }
.topbar { background: var(--navy); color: #fff; border-bottom: 2px solid #467e71; }
.top-inner { max-width: 1200px; min-height: 66px; padding: 12px 22px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand img { display: block; width: 149px; height: auto; }
.brand span { font-size: 14px; color: #c8ded9; border-left: 1px solid #577773; padding-left: 12px; }
.account { display: flex; align-items: center; gap: 10px; font-size: 14px; overflow-wrap: anywhere; }
.page { max-width: 1200px; margin: auto; padding: 34px 22px 60px; }
.heading { margin-bottom: 24px; }
.publication-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.publication-tabs button { display: grid; gap: 3px; min-height: 76px; padding: 12px 16px; border: 1px solid var(--line); background: white; color: var(--navy); text-align: left; }
.publication-tabs strong { font-size: 16px; }
.publication-tabs span { color: var(--muted); font-size: 13px; font-weight: 500; }
.publication-tabs button:hover { border-color: #6c9a8d; }
.publication-tabs [aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 -3px var(--accent); }
.access-info { margin-bottom: 20px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); font-size: 14px; }
.access-info strong { color: var(--navy); }
.access-info p + p { margin-top: 6px; }
h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.18; margin: 0 0 8px; letter-spacing: -.03em; }
h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.2; letter-spacing: -.02em; }
p { margin: 4px 0; }
.muted { color: var(--muted); font-size: 14px; }
.layout { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.card, dialog { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 2px 6px #102d330b; }
.auth { max-width: 420px; margin: 40px auto; padding: 28px; }
.auth h1 { font-size: 28px; }
.extra { margin-top: 20px; }
.client-picker { max-width: 360px; }
[data-client-forwards] h3 { margin: 0 0 8px; font-size: 16px; }
[data-dns-card] h3 { margin: 0 0 8px; font-size: 16px; }
[data-dns-card] .actions { margin-top: 10px; }
.wan-internal { display: block; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.proxy-editor { width: min(640px, calc(100% - 24px)); max-width: 640px; }
.proxy-tabs { display: flex; flex-wrap: wrap; gap: 5px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.proxy-tabs [aria-selected="true"] { background: var(--accent); color: white; }
.proxy-editor textarea { min-height: 65px; }
.download-cert { align-self: center; padding: 7px 0; font-size: 14px; color: var(--accent-strong); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 13px; margin-top: 16px; }
.wide, .full, .auth form > button, .auth form > .form-grid { grid-column: 1 / -1; }
.full { width: 100%; }
label { display: grid; gap: 5px; color: var(--navy); font-size: 14px; font-weight: 650; }
input, select, textarea, button { font: inherit; }
input, select, textarea { width: 100%; padding: 9px 11px; border: 1px solid #afc6bf; border-radius: 7px; color: inherit; background: #fff; min-width: 0; }
textarea { resize: vertical; }
button { cursor: pointer; border: 1px solid transparent; border-radius: 7px; padding: 8px 12px; font-size: 14px; font-weight: 650; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #379482; outline-offset: 2px; }
.primary { background: var(--accent); color: white; min-height: 42px; }
.primary:hover:not(:disabled) { background: var(--accent-strong); }
.quiet { color: var(--accent-strong); background: var(--accent-soft); }
.danger { background: #fff8f5; border-color: #f0d4cb; color: #8c3227; }
.cancel { margin-top: 10px; width: 100%; }
.notice { padding: 9px 12px; color: #8c3227; background: #fff1ed; border-radius: 7px; font-size: 14px; overflow-wrap: anywhere; }
.notice.success { color: #125839; background: #ebf9f1; }
.empty { color: var(--muted); border: 1px dashed var(--line); padding: 16px; border-radius: 8px; margin-top: 15px; }
.entry { padding: 14px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.entry:last-child { border-bottom: 0; padding-bottom: 0; }
[data-pending-rules] { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
[data-pending-rules] h3 { font-size: 15px; margin: 0; }
.entry-title { display: flex; align-items: start; flex-wrap: wrap; justify-content: space-between; gap: 7px; }
.pill { padding: 2px 8px; font-size: 12px; background: #fff3d6; color: #5f430b; border-radius: 18px; }
.pill.active { color: #125839; background: #e5f8ec; }
.mapping { font-family: ui-monospace, monospace; font-size: 13px; margin-top: 7px; }
.endpoints { margin: 8px 0; padding-left: 17px; font-size: 13px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.qr { display: block; width: 190px; max-width: 100%; margin: 8px auto; }
.manual { display: block; overflow-wrap: anywhere; padding-top: 6px; }
.event { display: grid; gap: 2px; grid-template-columns: minmax(0,.8fr) minmax(0,1.5fr) auto; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.event:last-child { border-bottom: 0; }
dialog { max-width: min(460px, calc(100% - 24px)); color: inherit; }
dialog::backdrop { background: #102d3390; }
.credential-content { display: grid; gap: 12px; }
@media (max-width: 740px) {
  .layout, .event { grid-template-columns: 1fr; }
  .page { padding-top: 24px; }
  .card { padding: 16px; }
}
@media (max-width: 420px) {
  .publication-tabs { gap: 7px; }
  .publication-tabs button { padding: 10px; }
  .publication-tabs strong { font-size: 14px; }
  .publication-tabs span { font-size: 12px; }
}
