/* ActiveDNS public site — X11/Motif-inspired research tool.
   Warm grey panels, square corners, two-tone bevels, slate title bars. */
:root {
  --desktop: #b5b9b7;
  --panel: #deddd5;
  --paper: #f8f7f1;
  --ink: #252b2e;
  --muted: #4c5559;
  --slate: #465b66;
  --red: #9b252b;
  --light: #fffef8;
  --shadow: #797d78;
  --line: #535b5a;
  --focus: #174f85;
  --link: #713036;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--desktop);
  font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; background: var(--desktop); }
[hidden] { display: none !important; }
a { color: var(--link); text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; border-radius: 0; }
button, select { background: var(--panel); border: 2px solid; border-color: var(--light) var(--shadow) var(--shadow) var(--light); box-shadow: 0 0 0 1px var(--line); min-height: 36px; padding: 5px 14px; }
button { cursor: pointer; }
button:hover:not(:disabled) { background: #eeede5; }
button:active:not(:disabled) { border-color: var(--shadow) var(--light) var(--light) var(--shadow); }
button:disabled { color: #59605c; cursor: default; box-shadow: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 2.2rem; letter-spacing: -1px; margin-bottom: 2px; }
h3 { font-size: 1rem; margin-bottom: 7px; }
code, #query, td, #query-summary, .examples button, .stats dd { font-family: "DejaVu Sans Mono", Consolas, "Liberation Mono", monospace; }

.application { max-width: 1500px; margin: auto; padding: 28px; }

/* Header */
.brand { display: flex; gap: 24px; align-items: center; margin-bottom: 24px; }
.brand p { margin-bottom: 0; }
.logo { width: 118px; height: auto; display: block; background: white; border: 1px solid var(--line); }
.eyebrow { font-size: .7rem; font-weight: bold; letter-spacing: 1.3px; }
/* Header navigation: bevelled buttons like the rest of the desktop; the
   current page is pressed (slate). */
.header-links { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; white-space: nowrap; font-size: .8rem; align-self: center; }
.header-links a { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink); text-decoration: none; background: var(--panel); border: 2px solid; border-color: var(--light) var(--shadow) var(--shadow) var(--light); box-shadow: 0 0 0 1px var(--line); padding: 6px 10px 5px; min-width: 78px; text-align: center; letter-spacing: .3px; }
.header-links img { display: block; width: 32px; height: 32px; }
.header-links a:hover { background: #eeede5; }
.header-links a:active { border-color: var(--shadow) var(--light) var(--light) var(--shadow); }
/* The current page: pressed in, on a light blue-grey that the icons stay visible on. */
.header-links a[aria-current="page"] { background: #b9c8d1; color: var(--ink); border-color: var(--shadow) var(--light) var(--light) var(--shadow); font-weight: bold; }
.header-links a[aria-current="page"]:hover { background: #c6d3db; }

/* Layout: the search page is one column; the About page has the
   database figures beside the reference. */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.about { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; align-items: start; }
.primary, .support { min-width: 0; }

/* Windows */
.window { background: var(--panel); border: 2px solid; border-color: var(--light) var(--shadow) var(--shadow) var(--light); outline: 1px solid var(--line); padding: 3px; margin-bottom: 22px; box-shadow: 3px 3px 0 #7b827e; min-width: 0; }
.title-bar { display: flex; justify-content: space-between; gap: 12px; background: var(--slate); color: white; font-size: .9rem; font-weight: bold; padding: 7px 10px; margin: 0; letter-spacing: .3px; }
.title-note { font-size: .7rem; align-self: center; white-space: nowrap; font-weight: bold; }
.panel-body { padding: 20px; }

/* Search form */
.modes { display: flex; flex-wrap: wrap; gap: 12px 24px; border: 0; padding: 0; margin: 0 0 18px; }
.modes legend { font-size: .8rem; margin-bottom: 8px; color: var(--muted); }
.modes label { cursor: pointer; }
input[type="radio"] { accent-color: var(--slate); width: 17px; height: 17px; vertical-align: -3px; }
.input-label { display: block; font-weight: bold; margin-bottom: 7px; }
.search-row { display: flex; gap: 12px; }
#query, #zt-query { min-width: 0; width: 100%; background: var(--paper); border: 2px solid; border-color: var(--shadow) var(--light) var(--light) var(--shadow); padding: 10px; }
#query[aria-invalid="true"], #zt-query[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--red); }
.search-button { font-weight: bold; padding-inline: 25px; min-width: 120px; }
/* Zone View's way back to the search: a link that looks like the buttons beside it. */
.back-button { display: flex; align-items: center; justify-content: center; white-space: nowrap; color: var(--ink); text-decoration: none; background: var(--panel); border: 2px solid; border-color: var(--light) var(--shadow) var(--shadow) var(--light); box-shadow: 0 0 0 1px var(--line); padding: 5px 18px; }
.back-button:hover { background: #eeede5; }
.back-button:active { border-color: var(--shadow) var(--light) var(--light) var(--shadow); }
.hint { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
.examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .8rem; margin-top: 15px; }
#examples { display: flex; flex-wrap: wrap; gap: 10px; }
.examples button { padding: 3px 9px; font-size: .8rem; min-height: 0; }
.feedback { color: #862025; margin: 16px 0 0; font-weight: bold; }

/* Results */
.result-summary, .result-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; font-size: .8rem; }
.action-group { display: flex; gap: 10px; flex-wrap: wrap; }
#query-summary { overflow-wrap: anywhere; }
.notice { margin: 0 14px 12px; padding: 9px 12px; font-size: .8rem; background: #f3ecd2; border: 1px solid #b7a85f; border-left: 5px solid #a88c1f; }
.table-scroll { max-width: 100%; overflow-x: auto; background: var(--paper); border: 2px solid; border-color: var(--shadow) var(--light) var(--light) var(--shadow); }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .8rem; white-space: nowrap; }
th { background: #e8e7df; font-size: .75rem; border-right: 1px solid #b6b8af; font-family: Arial, Helvetica, sans-serif; position: sticky; top: 0; }
th, td { padding: 9px 14px; border-bottom: 1px solid #cccec4; }
tbody tr:nth-child(even) { background: #efeee7; }
tbody tr:hover { background: #e1e8e8; }
td.muted { color: var(--muted); font-family: Arial, Helvetica, sans-serif; font-size: .75rem; }
.pivot { background: none; border: 0; box-shadow: none; min-height: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline dotted; text-underline-offset: 3px; cursor: pointer; }
.pivot:hover { background: none; text-decoration-style: solid; }
.pivot.near { font-family: Arial, Helvetica, sans-serif; font-size: .7rem; color: var(--muted); border: 1px solid #b6b8af; padding: 0 4px; text-decoration: none; vertical-align: 1px; }
.pivot.near:hover { color: var(--link); border-color: var(--link); }
.ext { display: inline-block; color: var(--muted); vertical-align: -1px; line-height: 0; text-decoration: none; padding: 2px; }
.ext:hover, .ext:focus-visible { color: var(--link); }
.ext svg { display: block; }
.tag { display: inline-block; font-family: Arial, Helvetica, sans-serif; font-size: .62rem; letter-spacing: .5px; color: var(--muted); border: 1px solid #b6b8af; padding: 0 4px; vertical-align: 1px; }
td.name .more { color: var(--muted); font-size: .75rem; }
.chain { margin-top: 4px; font-size: .75rem; color: var(--muted); white-space: normal; max-width: 52ch; overflow-wrap: anywhere; }
.chain .pivot { color: inherit; display: inline; white-space: normal; text-align: left; }
.table-scroll[data-chains="off"] .chain { display: none; }
.known-as { margin-top: 4px; font-size: .75rem; color: var(--muted); white-space: normal; max-width: 52ch; overflow-wrap: anywhere; }
.table-scroll[data-chains="on"] .known-as { display: none; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; cursor: pointer; }
.check input { accent-color: var(--slate); width: 16px; height: 16px; margin: 0; }
.empty-state { padding: 46px 24px; text-align: center; background: var(--paper); border: 1px solid #9b9f98; min-height: 236px; }
.empty-state h3 { font-size: 1.2rem; }
.empty-state p:last-child { max-width: 560px; margin: 12px auto 0; color: var(--muted); overflow-wrap: anywhere; }
.state-kicker { color: var(--slate); font-size: .7rem; letter-spacing: 1.5px; font-weight: bold; }
.empty-state[data-state="invalid"] .state-kicker, .empty-state[data-state="error"] .state-kicker, .empty-state[data-state="limit"] .state-kicker { color: var(--red); }
.empty-state[data-state="loading"] .state-kicker::after { content: " ▮"; animation: blink 1s steps(2) infinite; }
@keyframes blink { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .empty-state[data-state="loading"] .state-kicker::after { animation: none; } }
.status-strip { padding: 7px 10px; border: 1px solid; border-color: var(--shadow) var(--light) var(--light) var(--shadow); margin: 0; font-size: .75rem; background: #d1d3ca; }

/* Zone viewer (app.js; services/zonetrace/ZONEVIEW.md, section 7): a small
   X screen in the zone panel. The root weave behind; the nodes Athena
   widgets, white with a one-pixel black border and a fixed-width font, that
   thicken under the pointer and turn black while pressed; the node in the
   middle a twm window (without the title bar's buttons: nothing in it can be
   closed or iconified); a hub stippled grey, as X greys out what cannot be
   used; the edges one-pixel lines at right angles. */
.zone-body { padding: 0; background: var(--paper); border: 2px solid; border-color: var(--shadow) var(--light) var(--light) var(--shadow); }
/* Beside a search, the light drawing: the whole of it one link to Zone View,
   with the button that says so. */
.zv-open { display: block; color: inherit; text-decoration: none; cursor: pointer; }
.zv-open:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.zv-open-button { display: block; width: max-content; margin: 0 0 0 auto; font-size: .85rem; font-weight: bold; color: var(--ink); background: var(--panel); border: 2px solid; border-color: var(--light) var(--shadow) var(--shadow) var(--light); box-shadow: 0 0 0 1px var(--line); padding: 5px 14px; }
.zv-open > .zv-open-button { margin: 8px 10px 10px auto; }
.zv-open:hover .zv-open-button { background: #eeede5; }
.zv-open:active .zv-open-button { border-color: var(--shadow) var(--light) var(--light) var(--shadow); }
.zv-open .zv { border-bottom: 1px solid #000; }
.zv-light { padding: 14px 16px; gap: 0 32px; }
.zv-light .zv-branch, .zv-light .zv-out, .zv-light .zv-kids { column-gap: 32px; }
.zv { position: relative; display: flex; align-items: center; gap: 0 44px; padding: 22px 20px; overflow-x: auto; color: #000;
  font: 12px/1.4 "DejaVu Sans Mono", "Liberation Mono", Consolas, monospace;
  background: #797d7a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' shape-rendering='crispEdges'%3E%3Crect width='4' height='4' fill='%23797d7a'/%3E%3Cpath d='M3 0h1v1H3zM1 1h1v1H1zM2 2h1v1H2zM0 3h1v1H0z' fill='%23c2c5c1'/%3E%3C/svg%3E") 0 0 / 4px 4px; image-rendering: pixelated; }
.zv-edges { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
.zv-edges path { fill: none; stroke: #000; stroke-width: 1; shape-rendering: crispEdges; }
.zv-edges path.hot { stroke-width: 3; }
.zv-in, .zv-mid { flex: none; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.zv-mid { gap: 12px; align-items: flex-start; }
.zv-also { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-left: 26px; }
/* Side by side, a column of branches is a grid: each node in the first
   column, what it points to in the second, so the nodes of a column line up
   and have one width. */
.zv-out, .zv-kids { flex: none; display: grid; grid-template-columns: max-content; grid-auto-columns: max-content; gap: 10px 44px; align-items: center; }
.zv-out > .zv-branch, .zv-kids > .zv-branch { display: contents; }
.zv-branch > .zv-node { grid-column: 1; }
.zv-branch > .zv-kids { grid-column: 2; }
.zv-node { position: relative; z-index: 1; display: flex; flex-direction: column; background: #fff; border: 1px solid #000; padding: 2px 6px 3px; max-width: 48ch; min-width: 0; overflow-wrap: anywhere; }
.zv-kind { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: #555; }
.zv-node .pivot, .zv-title { color: inherit; font: inherit; text-align: left; text-decoration: none; overflow-wrap: anywhere; }
/* What can be clicked is raised, as an X button: grey, bevelled like the
   site's buttons, the whole node the button, pressed in while held. What
   cannot is flat and white, as an X label. The smaller pivots inside a node
   are small buttons of the same kind. */
.zv-cmd::after { content: ""; position: absolute; inset: 0; }
.zv-cmd:focus-visible { outline: none; }
.zv-click { background: var(--panel); box-shadow: inset 2px 2px 0 var(--light), inset -2px -2px 0 var(--shadow); padding: 3px 8px 4px; }
.zv-click:has(> .zv-cmd:hover) { background: #eeede5; }
.zv-click:has(> .zv-cmd:active) { background: #d3d2c9; box-shadow: inset 2px 2px 0 var(--shadow), inset -2px -2px 0 var(--light); }
.zv-click:has(> .zv-cmd:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.zv-line .pivot { position: relative; z-index: 1; display: inline-block; padding: 0 5px; line-height: 1.35; background: var(--panel); border: 1px solid #000; box-shadow: inset 1px 1px 0 var(--light), inset -1px -1px 0 var(--shadow); }
.zv-line .pivot:hover { background: #eeede5; }
.zv-line .pivot:active { background: #d3d2c9; box-shadow: inset 1px 1px 0 var(--shadow), inset -1px -1px 0 var(--light); }
.zv-line { display: block; }
.zv-tag { display: inline-block; font-size: 9px; letter-spacing: .5px; border: 1px solid currentColor; padding: 0 3px; margin: 1px 4px 0 0; line-height: 1.3; }
.zv-muted { color: #555; }
.zv-warn { color: #cd0000; }
.zv-refused { border-color: #cd0000; outline: 1px solid #cd0000; }
.zv-hub { color: #555; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2' shape-rendering='crispEdges'%3E%3Crect width='2' height='2' fill='%23deddd5'/%3E%3Cpath d='M0 0h1v1H0zM1 1h1v1H1z' fill='%23bdbcb4'/%3E%3C/svg%3E") 0 0 / 2px 2px; }
.zv-again { border-style: dashed; }
.zv-more { border-style: dotted; color: #444; }
.zv-middle { padding: 0; min-width: 26ch; max-width: 46ch; }
.zv-bar { display: flex; align-items: center; gap: 4px; padding: 3px 4px 3px 2px; border-bottom: 1px solid #000; font-weight: bold; }
.zv-name { padding: 0 3px; overflow-wrap: anywhere; }
.zv-hilite { flex: 1 1 12px; height: 9px; background: repeating-linear-gradient(to bottom, #000 0 1px, #fff 1px 2px); }
.zv-facts { display: flex; flex-direction: column; gap: 1px; padding: 4px 8px 6px; }
/* Top to bottom, when the columns do not fit: each step indented under the
   node it hangs from, the edges down its left side. */
.zv[data-orient="v"] { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 12px; }
.zv[data-orient="v"] .zv-in, .zv[data-orient="v"] .zv-out { margin-left: 26px; align-items: flex-start; }
.zv[data-orient="v"] .zv-out, .zv[data-orient="v"] .zv-kids { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.zv[data-orient="v"] .zv-branch { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; max-width: 100%; }
.zv[data-orient="v"] .zv-kids { margin-left: 26px; }
.zv[data-orient="v"] .zv-node, .zv[data-orient="v"] .zv-middle { max-width: 100%; min-width: 0; }
td .pivot { text-align: left; }

/* About page */
.reference { font-size: .85rem; }
.reference h3:not(:first-child) { margin-top: 24px; }
.reference code { overflow-wrap: anywhere; font-size: .8rem; }
.inset-note { padding: 10px; border-left: 3px solid var(--slate); margin-bottom: 0; background: #eeede5; }
.stats { margin: 0; display: grid; gap: 10px; }
.stats div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-bottom: 1px dotted #9b9f98; padding-bottom: 6px; }
.stats dt { font-size: .8rem; color: var(--muted); }
.stats dd { margin: 0; font-weight: bold; }
.newsletter { font-size: .85rem; display: grid; gap: 10px; }
.newsletter p { margin: 0; }
.newsletter .input-label { margin: 4px 0 0; }
.newsletter input[type="email"] { width: 100%; min-width: 0; margin-bottom: 1.2em; background: var(--paper); border: 2px solid; border-color: var(--shadow) var(--light) var(--light) var(--shadow); padding: 8px; }
.newsletter input[type="email"][aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--red); }
.newsletter label:has(input[type="checkbox"]) { display: block; cursor: pointer; }
.newsletter input[type="checkbox"] { accent-color: var(--slate); width: 16px; height: 16px; vertical-align: -3px; }
.newsletter button { justify-self: start; font-weight: bold; padding-inline: 20px; }
.newsletter .hint { margin: 0; }
.newsletter .hint.ok { color: #1f5a2e; font-weight: bold; }
.newsletter .hint.error { color: #862025; font-weight: bold; }

/* Footer */
.site-footer { border-top: 1px solid #747e77; padding-top: 22px; font-size: .85rem; }
.footer-columns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; }
.site-footer h2 { font-size: 1rem; }
.site-footer h3 { font-size: 1rem; }
.site-footer p { color: #343e3a; }
.footer-links { margin: 8px 0 0; padding-top: 14px; border-top: 1px dotted #9b9f98; }

/* Tools */
.tool-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 8px; }
.tool { background: var(--paper); border: 1px solid #9b9f98; padding: 16px; margin: 0; }
.tool .post-title { font-size: 1.15rem; }
.tool p:last-child { margin-bottom: 0; }
.button-link { display: inline-block; color: var(--ink); text-decoration: none; background: var(--panel); border: 2px solid; border-color: var(--light) var(--shadow) var(--shadow) var(--light); box-shadow: 0 0 0 1px var(--line); padding: 5px 14px; font-size: .85rem; }
.button-link:hover { background: #eeede5; }
.tools .post.tool { background: none; border: 0; padding: 0; }

/* News pages */
.brand-name { font-size: 2.2rem; font-weight: bold; letter-spacing: -1px; margin: 0 0 2px; line-height: 1.2; }
.brand-name a, .brand-link { color: inherit; text-decoration: none; }
.news { max-width: 860px; }
.post + .post { margin-top: 32px; padding-top: 24px; border-top: 1px solid #b6b8af; }
.post-title { font-size: 1.5rem; margin-bottom: 4px; }
.post-title a { color: inherit; }
.post-meta { font-size: .8rem; color: var(--muted); margin-bottom: 14px; }
.post p { max-width: 70ch; }
.title-bar .title-note a { color: white; }
.contact p { max-width: 70ch; }
.contact-address { margin: 18px 0; }
.contact-link { font-family: "DejaVu Sans Mono", Consolas, "Liberation Mono", monospace; font-size: 1.1rem; font-weight: bold; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { display: block; padding: 12px; background: var(--paper); }

@media (max-width: 950px) {
  .about { grid-template-columns: minmax(0, 1fr); }
  .brand { flex-wrap: wrap; }
  .header-links { margin-left: 0; width: 100%; }
  .footer-columns { grid-template-columns: 1fr 1fr; }
  .footer-columns #privacy { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .application { padding: 16px 12px; }
  .brand { gap: 14px; align-items: flex-start; }
  .logo { width: 74px; }
  h1, .brand .brand-name { font-size: 1.7rem; }
  .brand p { font-size: .8rem; }
  .brand .eyebrow { font-size: .6rem; }
  .panel-body { padding: 15px; }
  .search-row { flex-wrap: wrap; }
  .search-button, .back-button { width: 100%; }
  /* two rows of four on a phone */
  .header-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .header-links a { min-width: 0; padding: 5px 2px 4px; font-size: .72rem; }
  .header-links img { width: 28px; height: 28px; }
  .footer-columns { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .action-group { width: 100%; }
  .action-group button { flex: 1; }
}

/* Dialog ("Monitor for changes") */
.dialog { border: 2px solid; border-color: var(--light) var(--shadow) var(--shadow) var(--light); outline: 1px solid var(--line); background: var(--panel); padding: 3px; width: min(520px, 92vw); box-shadow: 3px 3px 0 #7b827e; color: inherit; }
.dialog::backdrop { background: rgba(37, 43, 46, .45); }
.dialog-form label { display: block; font-size: .85rem; margin: 14px 0 4px; }
.dialog-form input[type="email"], .dialog-form select { width: 100%; min-width: 0; background: var(--paper); border: 2px solid; border-color: var(--shadow) var(--light) var(--light) var(--shadow); padding: 8px; font: inherit; }
.dialog-form input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--red); }
.dialog-form .hint.ok { color: #1f5a2e; font-weight: bold; }
.dialog-form .hint.error { color: #862025; font-weight: bold; }
.dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }
