/* The fonts, served by the application itself, and page layouts of the application. */

html, body, #app { height: 100%; }
#app { display: flex; flex-direction: column; }

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

.sign-in-page { min-height: 100vh; display: grid; place-items: center; padding: var(--space-4); }
.sign-in-card {
  width: 100%; max-width: 360px; display: grid; gap: var(--space-4); padding: var(--space-5);
  background: var(--surface); border: 1px solid var(--border);
}
.sign-in-card h1 { margin: 0; font-size: var(--text-xl); font-weight: 600; text-wrap: balance; }
.sign-in-card form { display: grid; gap: var(--space-3); }
.sign-in-card .button { justify-content: center; }
.sign-in-or { margin: 0; text-align: center; font-size: var(--text-sm); color: var(--text-muted); }
.sign-in-links { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2); font-size: var(--text-sm); }
.link-button { padding: 0; border: 0; background: none; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

.page { padding: var(--space-3) var(--space-4) var(--space-5); display: grid; gap: var(--space-3); }
.page h1 { margin: 0; font-size: var(--text-xl); font-weight: 600; }
.page p { margin: 0; max-width: 68ch; }

.message { padding: var(--space-6) var(--space-4); max-width: 60ch; display: grid; gap: var(--space-3); }
.message h1 { margin: 0; font-size: var(--text-lg); font-weight: 600; }
.message p { margin: 0; color: var(--text-muted); }
.message .button { justify-self: start; }

/* The landscape page, from the approved design. */
.scope-field { flex-wrap: wrap; }


.past-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--warning-bg); border-bottom: 2px solid var(--warning); font-weight: 500;
}

.landscape-page { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-3) var(--space-4) var(--space-4); }
.heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
h1 { margin: 0; font-size: var(--text-xl); font-weight: 600; }
.summary { color: var(--text-muted); font-size: var(--text-sm); }
.actions, .tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.tools { justify-content: space-between; }
.tools .input { width: 280px; max-width: 100%; }
.count { font-size: var(--text-sm); color: var(--text-muted); }

.columns { position: relative; }
.columns summary { list-style: none; }
.columns summary::-webkit-details-marker { display: none; }
.columns-menu {
  position: absolute; right: 0; z-index: 5; margin-top: var(--space-1); padding: var(--space-3);
  display: grid; gap: var(--space-2); min-width: 200px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-overlay);
}
.columns-menu label { display: flex; gap: var(--space-2); align-items: center; font-size: var(--text-sm); }

.landscape {
  flex: 1; min-height: 240px; overflow: auto; border: 1px solid var(--border); background: var(--surface);
  scrollbar-color: var(--border-strong) var(--surface);
}
.table thead tr.groups th { top: 0; color: var(--text); text-align: left; }
.table thead tr.names th { top: 25px; }
.table thead th { z-index: 2; }
.landscape-flow { overflow: hidden; }
.details { outline: none; }
.sort {
  display: inline-flex; align-items: center; gap: var(--space-1); padding: 0; border: 0; background: none;
  color: inherit; font: inherit; cursor: pointer;
}
.sort:hover { color: var(--text); }
th[aria-sort] .sort { color: var(--text); }
.sort-mark { width: 8px; }
.cell-link {
  padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px;
}
.cell-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.type { display: inline-flex; align-items: center; gap: var(--space-1); }
.type svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.row-action {
  display: inline-flex; padding: 3px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: none; color: var(--text-muted); cursor: pointer;
}
.row-action:hover { color: var(--danger); border-color: var(--danger); }
.row-action svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; display: block; }
.none { color: var(--text-muted); }

.message { padding: var(--space-6) var(--space-4); text-align: left; max-width: 60ch; }
.message h2 { margin: 0 0 var(--space-1); font-size: var(--text-lg); font-weight: 600; }
.message p { margin: 0; color: var(--text-muted); }

.work { flex: 1; min-height: 0; display: flex; gap: var(--space-3); }
.work .landscape { flex: 1; min-width: 0; }
.details {
  width: 380px; flex-shrink: 0; overflow: auto; padding: var(--space-3) var(--space-4);
  background: var(--surface); border: 1px solid var(--border);
}
/* The buttons keep their place: the name gets a line of its own below them. */
.details-head {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: var(--space-2); margin-bottom: var(--space-3);
}
.details-kind { font-size: var(--text-xs); }
.details-actions { display: flex; gap: var(--space-2); white-space: nowrap; }
.details-head h2 { grid-column: 1 / -1; }
.details h2 { margin: 0; font-size: var(--text-lg); font-weight: 600; overflow-wrap: anywhere; }
.details h3 { margin: var(--space-4) 0 var(--space-2); font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.version-card { border-top: 1px solid var(--border); padding: var(--space-3) 0; }
.version-card dl { display: grid; grid-template-columns: 90px 1fr; gap: var(--space-1) var(--space-3); margin: var(--space-2) 0; font-size: var(--text-sm); }
.version-card dt { color: var(--text-muted); }
.version-card dd { margin: 0; overflow-wrap: anywhere; }
.flags { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.find { width: 200px; }
.skeleton { display: grid; gap: var(--space-2); padding: var(--space-3); }
.skeleton div { height: 18px; background: var(--surface-sunken); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .skeleton div { animation: none; } }
.form-grid { display: grid; gap: var(--space-3); margin-bottom: var(--space-3); }
.form-grid .two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.pan-switches { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; margin-bottom: var(--space-1); font-size: var(--text-sm); font-weight: 500; }
.retire-list { margin: 0 0 var(--space-3); padding-left: var(--space-4); font-size: var(--text-sm); }
.demo-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3);
  padding: var(--space-1) var(--space-4); background: var(--accent-soft); font-size: var(--text-sm);
}
.demo-banner p { margin: 0; flex: 1 1 32ch; }
.demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
/* The tour leaves the page usable: it sits in a corner and points at one part. */
.tour {
  position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 20;
  width: min(360px, calc(100vw - 2 * var(--space-4))); display: grid; gap: var(--space-2);
  padding: var(--space-4); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-overlay);
}
.tour h2 { margin: 0; font-size: var(--text-lg); font-weight: 600; }
.tour p { margin: 0; font-size: var(--text-sm); }
.tour-step { font-size: var(--text-xs); }
.tour-actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: var(--space-2); margin-top: var(--space-2); }
.tour-target { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Narrow screens: the page scrolls as a whole. The details show in full above
   the view, and the view keeps a fixed height with its own scrolling. */
@media (max-width: 900px) {
  html, body, #app { height: auto; }
  #app { min-height: 100%; }
  .landscape-page, .work { flex: none; }
  .work { flex-direction: column; }
  .work .landscape { flex: none; height: 70vh; }
  .details { order: -1; width: 100%; overflow: visible; scroll-margin-top: var(--space-2); }
}
@media (max-width: 720px) { .landscape-page { padding: var(--space-2); } }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.filters .input { width: auto; }
.filters input[type="search"] { width: 260px; max-width: 100%; }
.filters .scope-field { font-size: var(--text-xs); color: var(--text-muted); font-weight: 600; }
.key-box { padding: var(--space-3); background: var(--surface-sunken); border: 1px solid var(--border); overflow-wrap: anywhere; }
.check-list { display: grid; gap: var(--space-1); margin-bottom: var(--space-1); }
.check-list label { display: flex; gap: var(--space-2); }
.table td.actions-cell { text-align: right; }
.segment { display: inline-flex; align-items: center; min-height: 30px; padding: 0 var(--space-3); background: var(--surface); color: var(--text); font-weight: 500; text-decoration: none; }
.segment + .segment { border-left: 1px solid var(--border-strong); }
.segment:hover { background: var(--surface-sunken); }
.segment[aria-current="page"] { background: var(--accent); color: var(--on-accent); }

.help { max-width: 760px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-7); display: grid; gap: var(--space-5); overflow: auto; }
.help h1 { margin: 0; font-size: var(--text-2xl); font-weight: 600; }
.help h2 { margin: 0 0 var(--space-2); font-size: var(--text-lg); font-weight: 600; }
.help p, .help ul { margin: 0 0 var(--space-2); max-width: 68ch; }
.help li { margin-bottom: var(--space-1); }
.help dl { display: grid; grid-template-columns: 130px 1fr; gap: var(--space-2) var(--space-4); margin: 0; }
.help dt { font-weight: 600; }
.help dd { margin: 0; }
.help a { color: var(--accent); }
@media (max-width: 520px) { .help dl { grid-template-columns: 1fr; } }
.page { overflow: auto; }

.message a.button { justify-self: start; }
