/* Tech Dynamix start page. Tokens follow the brand guide. */
:root {
  --orange: #E87722;
  --orange-hover: #F58C3E;
  --orange-press: #CC6415;
  --on-orange: #2A1B0C;
  --peach: #FBEBDD;
  --violet: #7566A0;
  --teal: #1E7A8C;
  --red: #E5484D;
  --outerspace: #4A4947;

  --page: #FFFFFF;
  --panel: #F6F7F8;
  --input: #FFFFFF;
  --border: #D9DCE1;
  --text: #1E2024;
  --text-2: #5E6670;
  --chip: #FFFFFF;
  --chip-hover: #FBEBDD;
  --topbar: #FFFFFF;
  --shadow: 0 1px 2px rgba(23, 25, 28, .06);

  --font-head: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-num: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px; --s6: 48px;
  --r-card: 8px; --r-btn: 6px; --r-pill: 999px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #131519; --panel: #1E2024; --input: #2A2E34; --border: #3A3F47;
    --text: #F6F7F8; --text-2: #9AA2AD; --violet: #A396CF; --teal: #5CC3D8;
    --chip: #2A2E34; --chip-hover: #3A2A1C; --topbar: #1E2024; --peach: #3A2A1C;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #131519; --panel: #1E2024; --input: #2A2E34; --border: #3A3F47;
  --text: #F6F7F8; --text-2: #9AA2AD; --violet: #A396CF; --teal: #5CC3D8;
  --chip: #2A2E34; --chip-hover: #3A2A1C; --topbar: #1E2024; --peach: #3A2A1C;
  --shadow: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 14px/1.5 var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--font-head); color: var(--text); margin: 0; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: var(--s2); top: var(--s2); z-index: 20; background: var(--orange); color: var(--on-orange); padding: var(--s1) var(--s2); border-radius: var(--r-btn); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Logo: show the variant that matches the theme */
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--topbar); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: var(--s3); padding: var(--s1) var(--s3); min-height: 64px; max-width: 2000px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.logo-horizontal { height: 32px; width: auto; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font: 500 14px/1 var(--font-body); color: var(--text-2); background: none; border: 0;
  padding: 8px 16px; border-radius: var(--r-btn); cursor: pointer; white-space: nowrap; position: relative;
}
.tab:hover { color: var(--text); background: var(--panel); }
.tab[aria-selected="true"] { color: var(--text); font-weight: 600; }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--orange); }
.topbar-tools { display: flex; align-items: center; gap: var(--s1); flex-shrink: 0; }

/* Fields */
.field {
  display: flex; align-items: center; gap: var(--s1); background: var(--input); color: var(--text-2);
  border: 1px solid var(--border); border-radius: var(--r-card); padding: 0 4px 0 8px; min-height: 40px;
}
.field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 20%, transparent); }
.field input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; padding: 8px 0; outline: none; }
.field input::placeholder { color: var(--text-2); }
.field-lg { min-height: 52px; padding-left: var(--s2); font-size: 16px; border-radius: var(--r-card); box-shadow: var(--shadow); }
.filter { width: 220px; }
.filter kbd { font: 500 11px/1 var(--font-mono); border: 1px solid var(--border); border-radius: 4px; padding: 4px 4px; color: var(--text-2); margin-right: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  font: 600 14px/1 var(--font-body); border-radius: var(--r-btn); padding: 8px 24px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
}
.btn-sm { padding: 8px 8px; font-size: 13px; }
.btn-primary { background: var(--orange); color: var(--on-orange); }
.btn-primary:hover { background: var(--orange-hover); }
.btn-primary:active { background: var(--orange-press); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--panel); }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-btn);
  border: 0; background: none; color: var(--text-2); cursor: pointer; flex-shrink: 0;
}
.icon-btn:hover { background: var(--panel); color: var(--text); }
.icon-btn:disabled { opacity: .35; cursor: default; background: none; }

/* User menu */
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-pill);
  background: var(--violet); color: #FFFFFF; font: 600 13px/1 var(--font-num);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { color: #131519; } }
:root[data-theme="dark"] .avatar { color: #131519; }
.user-pop {
  position: absolute; right: 0; top: calc(100% + var(--s1)); width: 260px; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--s2); box-shadow: 0 8px 24px rgba(23, 25, 28, .16);
}
.user-pop p { margin: 0; overflow-wrap: anywhere; }
.user-name { font-weight: 600; }
.user-email { font-size: 13px; margin-bottom: 8px !important; }

/* Hero */
main { flex: 1; width: 100%; max-width: 2000px; margin: 0 auto; padding: 0 var(--s3) var(--s5); }
.hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: var(--s4) 0 var(--s3); }
.greeting { margin: 0; font: 600 22px/1.2 var(--font-head); color: var(--text); }
.google-search { width: min(640px, 100%); }

/* Grid of columns */
.grid { display: grid; gap: var(--s2); align-items: start; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); }
.grid[data-cols="1"] { --cols: 1; } .grid[data-cols="2"] { --cols: 2; } .grid[data-cols="3"] { --cols: 3; } .grid[data-cols="4"] { --cols: 4; }
.column { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
@media (max-width: 1500px) { .grid[data-cols="5"] { --cols: 3; } }
@media (max-width: 1280px) { .grid { --cols: 2 !important; } }
@media (max-width: 720px) {
  .grid { --cols: 1 !important; }
  main { padding: 0 var(--s2) var(--s4); }
  .topbar-inner { flex-wrap: wrap; padding: var(--s1) var(--s2); gap: var(--s1) var(--s2); }
  .tabs { order: 3; flex-basis: 100%; }
  .filter { width: 150px; }
  .filter kbd { display: none; }

}

/* Cards */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--s3); min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s1); margin-bottom: var(--s2); }
.card-title {
  display: inline-block; font-size: 16px; font-weight: 600; line-height: 1.3;
  padding-bottom: 4px; border-bottom: 2px solid var(--violet); margin-bottom: var(--s2);
}
.card-head .card-title { margin-bottom: 0; }
.card-action { font-size: 12px; text-decoration: none; white-space: nowrap; padding-top: 4px; }
.card-action:hover { text-decoration: underline; }
.pill { font-size: 12px; background: var(--input); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 4px 8px; color: var(--text-2); }

/* Link chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--s1); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s1); min-height: 40px; padding: 4px 8px 4px 8px;
  background: var(--chip); border: 1px solid var(--border); border-radius: var(--r-btn);
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.2; max-width: 100%;
}
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .fav { width: 24px; height: 24px; }
.chip .fav-initial { font-size: 13px; }
a.chip:hover { background: var(--chip-hover); border-color: var(--orange); }
.chip-old span:not(.sr-only) { text-decoration: line-through; color: var(--text-2); }
.chip-unset { border-style: dashed; color: var(--text-2); cursor: help; }
.fav { width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0; object-fit: contain; }
.fav-initial {
  display: inline-grid; place-items: center; background: var(--peach); color: var(--text);
  font: 600 11px/1 var(--font-num);
}
.is-filtered-out { display: none !important; }

/* Search widgets */
.card-search .card-title { font-size: 15px; margin-bottom: 8px; }

/* Feeds */
.feed-list { list-style: none; margin: 0; padding: 0; min-height: 240px; }
.feed-list li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--border); }
.feed-list li:last-child { border-bottom: 0; }
.feed-list a { flex: 1; min-width: 0; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.feed-list a:hover { color: var(--teal); text-decoration: underline; }
.feed-list time { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: center; gap: var(--s1); margin-top: var(--s1); }
.pager-label { font-size: 12px; color: var(--text-2); min-width: 32px; text-align: center; }

/* My IP */
.ip-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.ip-value { font-size: 24px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }

/* Status */
.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.status-list li:first-child { padding-top: 0; }
.status-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.status-name { display: inline-flex; align-items: center; gap: var(--s1); min-width: 0; color: var(--text); text-decoration: none; font-size: 13px; }
.status-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.status-name:hover span { color: var(--teal); text-decoration: underline; }
.status-badge {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; min-width: 112px;
  font: 500 12px/1 var(--font-body); color: var(--text-2); border-radius: var(--r-pill); padding: 4px 8px; border: 1px solid var(--border);
}
.status-badge[data-state="ok"] { color: var(--teal); border-color: currentColor; }
.status-badge[data-state="maintenance"] { color: var(--orange); border-color: currentColor; }
.status-badge[data-state="minor"] {
  color: var(--text); font-weight: 700; border: 2px solid var(--orange);
  background: color-mix(in srgb, var(--orange) 16%, var(--page));
}
/* Degraded rows get the same treatment as outages in orange, like a warning callout */
.status-list li:has(.status-badge[data-state="minor"]) {
  background: color-mix(in srgb, var(--orange) 8%, transparent);
  box-shadow: inset 4px 0 0 var(--orange);
  border-radius: var(--r-btn);
  padding-left: var(--s2); padding-right: var(--s1);
  margin: 0 calc(-1 * var(--s1));
}
.status-badge[data-state="major"] {
  color: var(--text); font-weight: 700; border: 2px solid var(--red);
  background: color-mix(in srgb, var(--red) 16%, var(--page));
}
/* The whole row stands out during an outage: tint plus a red edge, like a critical callout */
.status-list li:has(.status-badge[data-state="major"]) {
  background: color-mix(in srgb, var(--red) 8%, transparent);
  box-shadow: inset 4px 0 0 var(--red);
  border-radius: var(--r-btn);
  padding-left: var(--s2); padding-right: var(--s1);
  margin: 0 calc(-1 * var(--s1));
}
.status-badge.status-none { border-style: dashed; }

/* Weather */
.weather-now { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.weather-icon { font-size: 40px; line-height: 1; }
.weather-temp { font-size: 44px; font-weight: 600; line-height: 1; }
.weather-desc { font-size: 14px; }
.weather-desc strong { display: block; font-weight: 600; }
.weather-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s1); margin-top: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--border); text-align: center; font-size: 12px; }
.weather-days .d-icon { font-size: 18px; display: block; margin: 4px 0; }
.weather-days .d-rain { color: var(--teal); }

/* Radar */
.radar-frame { aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); background: var(--input); }
.radar-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Todos */
.progress { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.progress-label { font-size: 12px; color: var(--text-2); min-width: 32px; }
.progress-track { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--border); overflow: hidden; }
.progress-fill { display: block; height: 100%; width: 0; background: var(--orange); transition: width .2s; }
.todo-list { list-style: none; margin: 0 0 8px; padding: 0; }
.todo-list li { display: flex; align-items: flex-start; gap: var(--s1); padding: 4px 0; border-bottom: 1px solid var(--border); }
.todo-list input[type="checkbox"] { margin: 4px 0 0; accent-color: var(--orange); width: 16px; height: 16px; flex-shrink: 0; }
.todo-text { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.todo-list li.done .todo-text { text-decoration: line-through; color: var(--text-2); }
.todo-del { width: 24px; height: 24px; opacity: 0; }
.todo-list li:hover .todo-del, .todo-del:focus-visible { opacity: 1; }
.todo-note { margin: var(--s1) 0 0; font-size: 12px; }

/* Callouts */
.callout { border: 1px solid var(--border); border-left: 4px solid var(--violet); background: var(--panel); border-radius: var(--r-card); padding: var(--s2) var(--s3); margin: 0 0 var(--s2); }
.callout strong { margin-right: var(--s1); }
.callout-tip { border-left-color: var(--teal); }
.callout-warning { border-left-color: var(--orange); }
.callout-critical { border-left-color: var(--red); }

.footer { text-align: center; padding: var(--s3) var(--s2); border-top: 1px solid var(--border); }
.footer p { margin: 0; }

/* Sign-in and message pages */
.message-page { align-items: center; justify-content: center; padding: var(--s2); background: var(--panel); }
.message-card {
  width: min(440px, 100%); background: var(--page); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: var(--s5) var(--s4); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s2);
}
.logo-stacked { height: 96px; width: auto; }
.message-card h1 { font-size: 22px; font-weight: 600; }
.message-text { margin: 0; color: var(--text-2); }
.btn-ms { margin-top: var(--s1); }
.tagline { margin: 0; font: 600 15px/1.4 var(--font-head); }
.tagline-a { color: #000000; }
.tagline-b { color: var(--orange); text-decoration: underline double; text-underline-offset: 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tagline-a { color: #FFFFFF; } }
:root[data-theme="dark"] .tagline-a { color: #FFFFFF; }

/* Admin sign-in form */
.form-callout { width: 100%; text-align: left; margin: 0; padding: 8px var(--s2); font-size: 13px; }
.form-callout code { font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.form-stack { width: 100%; display: flex; flex-direction: column; gap: var(--s2); text-align: left; }
.form-stack label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: 13px; }
.input {
  font: inherit; font-size: 15px; color: var(--text); background: var(--input);
  border: 1px solid var(--border); border-radius: var(--r-card); padding: 8px 8px; min-height: 44px;
}
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 20%, transparent); }
.form-stack .btn { margin-top: var(--s1); width: 100%; }

/* Color logo on a light plate, for dark mode when no inverted logo file exists */
.logo-plate { display: inline-flex; border-radius: var(--r-btn); }
.logo-plate img { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-plate { background: #FFFFFF; padding: 4px 8px; } }
:root[data-theme="dark"] .logo-plate { background: #FFFFFF; padding: 4px 8px; }
.logo-horizontal { height: 40px; }
.message-card .logo-stacked { height: auto; width: min(320px, 100%); }

/* Notes tables */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; background: var(--page); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.table th, .table td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table thead th { background: var(--panel); font-weight: 600; color: var(--text-2); font-size: 12px; }
.table tbody th { font-weight: 600; white-space: nowrap; }
.table tbody tr:last-child th, .table tbody tr:last-child td { border-bottom: 0; }
.notes-note { margin: 0 0 8px; color: var(--text-2); font-size: 13px; }

/* Embedded pages */
.embed-frame { height: 75vh; min-height: 480px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #FFFFFF; }
.embed-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.column:has(.card-embed) { grid-column: span 2; }
@media (max-width: 1280px) { .column:has(.card-embed) { grid-column: auto; } }

/* Most used */
.card-most-used { margin-bottom: var(--s2); }
.card-most-used .card-title { margin-bottom: 8px; }
.most-used-empty { margin: 0; font-size: 13px; }

/* EasyDMARC scanner */
.easydmarc-embed iframe { display: block; width: 100%; min-height: 265px; border: 0; border-radius: var(--r-card); background: #FFFFFF; }

.weather-updated { margin: var(--s1) 0 0; font-size: 12px; text-align: right; }

/* Icon pickers: the icon in a search box opens a list of engines or record types */
.picker { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.picker-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px; margin-left: -4px;
  background: none; border: 0; border-radius: var(--r-btn); color: var(--text-2); cursor: pointer;
}
.picker-btn:hover, .picker-btn[aria-expanded="true"] { background: var(--panel); color: var(--text); }
.picker-icon { display: inline-flex; }
.field-lg .picker-icon .fav { width: 24px; height: 24px; }
.picker-value {
  font: 600 12px/1 var(--font-mono); color: var(--text); background: var(--panel);
  border: 1px solid var(--border); border-radius: 4px; padding: 4px; white-space: nowrap;
}
.picker-btn:hover .picker-value, .picker-btn[aria-expanded="true"] .picker-value { background: var(--page); }
.picker-menu {
  position: absolute; top: calc(100% + var(--s1)); left: -8px; z-index: 30; min-width: 200px; max-height: 320px; overflow-y: auto;
  margin: 0; padding: 4px; list-style: none; background: var(--page); border: 1px solid var(--border);
  border-radius: var(--r-card); box-shadow: 0 8px 24px rgba(23, 25, 28, .16);
}
.picker-menu:focus { outline: none; }
.picker-menu li {
  display: flex; align-items: center; gap: var(--s1); padding: 8px; border-radius: var(--r-btn);
  font-size: 14px; color: var(--text); cursor: pointer;
}
.picker-menu li.is-active { background: var(--chip-hover); }
.picker-menu li[aria-selected="true"] { font-weight: 600; }
.picker-menu li[aria-selected="true"]::after { content: "\2713"; margin-left: auto; color: var(--teal); }
.picker-menu .fav { width: 20px; height: 20px; }
