/* Twisted360 Free DNS */
:root {
  --ink: #14202e;
  --ink-2: #4a5868;
  --page: #f5f7fa;
  --panel: #ffffff;
  --rule: #d3dae3;
  --blue: #1d63d8;
  --blue-d: #154ca8;
  --blue-wash: #eaf1fc;
  --ok: #1e7c46;
  --ok-wash: #e7f4ec;
  --warn: #9a6200;
  --warn-wash: #fdf3df;
  --err: #b4322a;
  --err-wash: #fbeceb;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 6px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: var(--blue); }
a:hover { color: var(--blue-d); }
:focus-visible { outline: 3px solid #8fb4f3; outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; font-weight: 650; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .9em; }
code, .mono, pre { font-family: var(--mono); font-size: .9em; }
code { background: #eef1f5; padding: .05em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 1.2rem 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.small { font-size: .87rem; }
.muted { color: var(--ink-2); }
.hint { color: var(--ink-2); font-weight: 400; font-size: .85rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* header / footer */
.top { background: var(--ink); color: #fff; }
.top-in, .foot-in, .wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-t360 { font-weight: 700; font-size: 1.1rem; letter-spacing: .01em; }
.brand-svc { font-weight: 400; font-size: 1.1rem; color: #a9c4f2; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a, .nav .link { color: #dbe5f3; text-decoration: none; font-size: .93rem; }
.nav a:hover, .nav .link:hover { color: #fff; text-decoration: underline; }
.nav .adm { background: #2a3a4f; padding: 3px 10px; border-radius: 99px; }
.wrap { padding-top: 26px; padding-bottom: 48px; min-height: calc(100vh - 140px); }
.foot { border-top: 1px solid var(--rule); background: var(--panel); }
.foot-in { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-top: 16px; padding-bottom: 16px; font-size: .85rem; color: var(--ink-2); }

/* forms and buttons */
form.inline, .inline { display: inline; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 5px; font-weight: 600; font-size: .9rem; }
label.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; }
label.check input { margin-top: .25em; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #b9c3cf; border-radius: var(--r);
  padding: 8px 10px; width: 100%; min-width: 0;
}
input[type=checkbox] { width: auto; }
input:focus, select:focus { border-color: var(--blue); outline: 2px solid #cfe0fb; }
.btn {
  display: inline-block; font: inherit; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer;
  background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: var(--r); padding: 8px 18px;
}
.btn:hover { background: var(--blue-d); border-color: var(--blue-d); color: #fff; }
.btn-ghost { background: #fff; color: var(--blue); }
.btn-ghost:hover { background: var(--blue-wash); color: var(--blue-d); }
.btn-danger { background: var(--err); border-color: var(--err); }
.btn-danger:hover { background: #8f241e; border-color: #8f241e; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.danger, .link.danger { color: var(--err); }
.hp { position: absolute; left: -9999px; }
.form-err { background: var(--err-wash); color: var(--err); border-left: 4px solid var(--err); padding: 9px 12px; border-radius: 0 var(--r) var(--r) 0; }

/* containers */
.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px; margin: 0 0 20px; }
.narrow { max-width: 520px; margin: 0 auto; }
.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 62ch; }
.page-head { margin-bottom: 18px; }
.page-head h1 { margin-bottom: .2em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 26px; }
.empty { background: var(--panel); border: 1px dashed #b9c3cf; border-radius: var(--r); padding: 22px; }

/* flash */
.flash { padding: 10px 14px; border-radius: var(--r); margin: 0 0 16px; border: 1px solid; }
.flash-ok { background: var(--ok-wash); border-color: #b5dcc4; color: var(--ok); }
.flash-info { background: var(--blue-wash); border-color: #c3d6f5; color: var(--blue-d); }
.flash-err { background: var(--err-wash); border-color: #efc4c1; color: var(--err); }

/* home */
.home { display: grid; grid-template-columns: 290px 1fr; gap: 40px; align-items: start; }
.login-panel { background: var(--panel); border: 1px solid var(--rule); border-top: 4px solid var(--blue); border-radius: var(--r); padding: 22px; position: sticky; top: 20px; }
.login-panel .btn { width: 100%; }
.pitch h1 { font-size: 2.3rem; max-width: 20ch; margin-top: .1em; }
.dig { margin: 26px 0 30px; background: var(--ink); color: #e6edf7; border-radius: 8px; padding: 18px 22px 14px; max-width: 720px; }
.dig pre { margin: 0; overflow-x: auto; font-size: .92rem; line-height: 1.6; }
.dig .c { color: #8796aa; }
.dig b { color: #7fb0ff; font-weight: 600; }
.dig figcaption { margin-top: 10px; font-size: .82rem; color: #9fb0c6; }
.dig figcaption code { background: #26364b; color: #e6edf7; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 32px; max-width: 760px; }
.cols p { color: var(--ink-2); }
.h-step { margin-top: 1.4em; }
.steps { padding-left: 1.3em; max-width: 64ch; }
.steps li { margin-bottom: .4em; }

/* tables */
.grid { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.grid th { text-align: left; font-size: .82rem; font-weight: 600; color: var(--ink-2); background: #f0f3f7; padding: 8px 12px; border-bottom: 1px solid var(--rule); }
.grid td { padding: 8px 12px; border-bottom: 1px solid #e7ebf0; vertical-align: top; }
.grid tr:last-child td { border-bottom: 0; }
.grid tbody tr:hover { background: #f8fafc; }
.zname { font-weight: 600; font-family: var(--mono); }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--blue-wash); color: var(--blue-d); }
.tag-sec { background: #efeaf8; color: #5b3e99; }
.tag-pending { background: var(--warn-wash); color: var(--warn); }
.tag-active { background: var(--ok-wash); color: var(--ok); }
.tag-disabled { background: var(--err-wash); color: var(--err); }
.rec td.val { word-break: break-all; max-width: 520px; }
.rtype { font-family: var(--mono); font-weight: 700; font-size: .85rem; color: var(--blue-d); }
.acts { white-space: nowrap; text-align: right; }
.acts > * + * { margin-left: 10px; }
.acts .link + .link { margin-left: 10px; }
.editing { background: var(--blue-wash) !important; }
.ddns-note { font-family: var(--sans); font-size: .78rem; color: var(--ok); margin-top: 2px; }

/* zone page */
.zone-layout { display: grid; grid-template-columns: 210px 1fr; gap: 28px; align-items: start; }
.zlist { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px; position: sticky; top: 20px; }
.zlist h2 { font-size: .95rem; color: var(--ink-2); }
.zlist ul { list-style: none; margin: 0 0 10px; padding: 0; }
.zlist li a { display: block; padding: 5px 8px; border-radius: 4px; text-decoration: none; font-family: var(--mono); font-size: .86rem; overflow-wrap: anywhere; }
.zlist li a:hover { background: var(--blue-wash); }
.zlist li a[aria-current] { background: var(--blue); color: #fff; }
.zone-title { font-family: var(--mono); font-weight: 650; overflow-wrap: anywhere; }
.h-rec { margin-top: 6px; }
.deleg { border-radius: var(--r); padding: 14px 18px; margin: 0 0 20px; border: 1px solid; }
.deleg p:last-child { margin-bottom: 0; }
.deleg-ok { background: var(--ok-wash); border-color: #b5dcc4; }
.deleg-partial, .deleg-none { background: var(--warn-wash); border-color: #ecd6a8; }
.deleg-elsewhere { background: var(--warn-wash); border-color: #ecd6a8; }
.nslist { list-style: none; padding: 0; margin: 0 0 10px; display: flex; gap: 10px; flex-wrap: wrap; }
.nslist code { font-size: 1rem; background: #fff; border: 1px solid #ecd6a8; padding: 4px 10px; }
.keybox { border-color: #b5dcc4; background: #f6fbf8; }
.key { font-size: 1.15rem; background: #fff; border: 1px solid #b5dcc4; padding: 6px 12px; user-select: all; }
.code { background: #eef1f5; border: 1px solid var(--rule); border-radius: var(--r); padding: 10px 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
.recform { display: grid; grid-template-columns: 2fr 110px 140px; gap: 12px 14px; align-items: end; }
.recform .f-value { grid-column: 1 / -1; }
.recform .f-prio, .recform .f-weight, .recform .f-port, .recform .f-caaflag, .recform .f-caatag { grid-column: span 1; }
.recform .f-ddns, .recform .f-go { grid-column: 1 / -1; }
.recform [hidden] { display: none; }
.f-go { display: flex; align-items: center; gap: 16px; }
.suffix { display: flex; align-items: stretch; }
.suffix input { border-radius: var(--r) 0 0 var(--r); flex: 1 1 auto; min-width: 5em; }
.suffix span { display: flex; align-items: center; padding: 0 10px; background: #eef1f5; border: 1px solid #b9c3cf; border-left: 0; border-radius: 0 var(--r) var(--r) 0; font-family: var(--mono); font-size: .85rem; font-weight: 400; color: var(--ink-2); flex: 0 0 auto; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: end; }
.masters { display: flex; gap: 8px; align-items: end; }
.danger-zone { border-color: #efc4c1; }
.danger-zone h2 { color: var(--err); }
.inline-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.inline-form label { flex: 1 1 260px; }
details.inline { display: inline-block; }
details summary { cursor: pointer; }
.mini { margin-top: 8px; text-align: left; min-width: 240px; }

/* account / help */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
.doc { max-width: 760px; }
.doc h2 { margin-top: 1.6em; }
.doc li { margin-bottom: .35em; }
.small-grid td { font-size: .9rem; }

/* admin */
.admin-meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 0 0 20px; }
.stats div { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r); padding: 10px 14px; }
.stats dt { font-size: .82rem; color: var(--ink-2); }
.stats dd { margin: 0; font-size: 1.4rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.tabbar { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; }
.tabs a { padding: 7px 14px; border-radius: var(--r) var(--r) 0 0; text-decoration: none; border: 1px solid transparent; border-bottom: 0; }
.tabs a[aria-current] { background: var(--panel); border-color: var(--rule); color: var(--ink); font-weight: 600; }
.find { display: flex; gap: 8px; }
.find input { width: 220px; }
.log td { font-size: .88rem; }

.home > *, .zone-layout > *, .two > * { min-width: 0; }
.dig { max-width: 100%; }
.grid input[name=limit] { width: 4.5em; display: inline-block; padding: 3px 6px; }
@media (max-width: 860px) {
  .home, .zone-layout, .two { grid-template-columns: 1fr; }
  .login-panel, .zlist { position: static; }
  .pitch h1 { font-size: 1.8rem; }
  .cols { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .recform { grid-template-columns: 1fr 1fr; }
  .recform .f-name { grid-column: 1 / -1; }
  .grid { display: block; overflow-x: auto; }
  .acts { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
