/* cyd-standard.css: CYD (/cyd/) in the site's own look and layout.
   Used together with the site's style.css. */
:root { --cd-ok: #4fbf72; --cd-soon: #e0a030; }
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) { --cd-ok: #2e7d46; --cd-soon: #9a6400; }
}
html[data-theme="light"] { --cd-ok: #2e7d46; --cd-soon: #9a6400; }

body { overflow-y: auto; overflow-x: hidden; align-items: flex-start; padding: 40px 0; }
.cyd-main { width: 100%; display: flex; justify-content: center; }
.panel { width: min(760px, calc(100vw - 28px)); }
[hidden] { display: none !important; }
:focus-visible { outline: 1px solid var(--red); outline-offset: 2px; }

/* Address bar: "Beta" tag */
.bar .cyd-tag { font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cd-soon); border: 1px solid currentColor; padding: 1px 6px; margin-left: auto; }

.cyd-lede p { margin: 0; }

/* Buttons and status pills */
.cd-btn {
  font-family: 'Courier New', Courier, monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--grey); background: transparent; border: 1px solid var(--grey-dim); padding: 6px 12px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s; -webkit-tap-highlight-color: transparent;
}
.cd-btn:hover { color: var(--red); border-color: var(--red-dim); }
.cd-pill {
  display: inline-flex; align-items: center; padding: 2px 8px; border: 1px solid currentColor;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; color: var(--grey);
}
.cd-pill.ok { color: var(--cd-ok); }
.cd-pill.soon { color: var(--cd-soon); }
.cd-pill.ended { color: var(--red); }
.cd-source { font-size: 11px; color: var(--muted); line-height: 1.6; margin-bottom: 18px; }

.cd-mono { font-family: 'Courier New', Courier, monospace; }
.cd-k { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cd-card { border: 1px solid var(--grey-dim); padding: 20px 22px; margin-bottom: 18px; }
.cd-card a, .cd-source a { color: var(--grey); }
.cd-card a:hover, .cd-source a:hover { color: var(--red); }

/* Before the check */
.cd-lead { font-size: 14px; color: var(--text); margin: 0 0 10px; }
.cd-steps { margin: 0 0 16px; padding-left: 22px; font-size: 14px; line-height: 1.7; color: var(--text); display: flex; flex-direction: column; gap: 6px; }
.cd-steps li::marker { color: var(--red); font-weight: bold; }
.cd-promise { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--cd-ok); margin: 0 0 20px; }
.cd-promise a { color: var(--grey); margin-left: 4px; }
.cd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cd-ok); box-shadow: 0 0 6px var(--cd-ok); flex: none; }
.cd-go {
  font-family: 'Courier New', Courier, monospace;
  font-size: 15px; font-weight: bold; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text); background: transparent;
  border: 1px solid var(--red); box-shadow: 0 0 16px var(--red-glow), inset 0 0 0 1px var(--red-dim);
  padding: 14px 26px; min-height: 48px; cursor: pointer;
  transition: color 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.cd-go:hover { color: var(--red); box-shadow: 0 0 22px var(--red-glow), inset 0 0 0 1px var(--red); }
.cd-go:disabled { opacity: 0.6; cursor: default; }
.cd-progress { font-size: 12px; color: var(--muted); margin: 12px 0 0; min-height: 1.4em; }

/* Choosing how to check */
.cd-modes { border: 0; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cd-modes legend { font-size: 14px; color: var(--text); padding: 0; margin-bottom: 10px; }
.cd-mode { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--grey-dim); padding: 12px 14px; cursor: pointer; transition: border-color 0.15s; }
.cd-mode:hover { border-color: var(--red-dim); }
.cd-mode:has(input:checked) { border-color: var(--red); box-shadow: 0 0 14px var(--red-glow); }
.cd-mode input { margin: 3px 0 0; width: 16px; height: 16px; accent-color: var(--red); flex: none; }
.cd-mode span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cd-mode b { font-size: 14px; color: var(--text); }
.cd-mode small { font-size: 12px; color: var(--grey); line-height: 1.5; }

.cd-fields { display: flex; flex-direction: column; gap: 6px; margin: 0 0 18px; padding: 14px; border-left: 2px solid var(--red-dim); background: rgba(128,128,128,0.04); }
.cd-fields label { font-size: 13px; color: var(--text); margin-top: 6px; }
.cd-fields label:first-child { margin-top: 0; }
.cd-opt { color: var(--muted); }
.cd-fields input, .cd-fields select {
  font-family: inherit; font-size: 15px; color: var(--text);
  background: rgba(128,128,128,0.06); border: 1px solid var(--grey-dim); border-radius: 0;
  padding: 10px 12px; min-height: 44px; width: 100%; max-width: 26em;
}
.cd-fields select option { background: var(--bg); color: var(--text); }
.cd-fields input:focus, .cd-fields select:focus { outline: none; border-color: var(--red); }
.cd-fields input::placeholder { color: var(--muted); }
.cd-hint { font-size: 11px; color: var(--muted); }

.cd-more {
  font-family: inherit; font-size: 12px; color: var(--grey); background: none; border: 0; padding: 4px 0;
  margin: -6px 0 16px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.cd-more:hover { color: var(--red); }
.cd-more::after { content: ' ▾'; text-decoration: none; display: inline-block; margin-left: 4px; }
.cd-more[aria-expanded="true"]::after { content: ' ▴'; }

/* Headline answer */
.cd-verdict { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; --c: var(--grey); }
.cd-verdict.ok { --c: var(--cd-ok); }
.cd-verdict.soon { --c: var(--cd-soon); }
.cd-verdict.ended { --c: var(--red); }
.cd-verdict-mark {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  border: 2px solid var(--c); color: var(--c); box-shadow: 0 0 14px color-mix(in srgb, var(--c) 35%, transparent);
  font-family: 'Courier New', Courier, monospace; font-size: 24px; font-weight: bold;
}
.cd-verdict h2 { font-size: 20px; color: var(--c); margin: 0 0 4px; line-height: 1.25; letter-spacing: 0.02em; }
.cd-verdict p { font-size: 14px; color: var(--text); line-height: 1.6; margin: 0; }

/* Risk level for unsupported devices */
.cd-risk { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; border: 1px solid var(--c); border-left-width: 4px; padding: 10px 14px; margin-bottom: 16px; --c: var(--grey); }
.cd-risk.low { --c: var(--cd-soon); }
.cd-risk.medium { --c: #e07a30; }
.cd-risk.high { --c: var(--red); }
.cd-risk-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cd-risk-level { font-family: 'Courier New', Courier, monospace; font-size: 18px; letter-spacing: 0.12em; color: var(--c); }
.cd-risk-reason { font-size: 13px; color: var(--text); flex-basis: 100%; }
.cd-suggest { border-left: 2px solid var(--cd-ok); padding-left: 12px; }
.cd-modern { border: 1px solid var(--cd-ok); border-left-width: 4px; padding: 10px 14px; margin: 0 0 16px; font-size: 13px; line-height: 1.6; color: var(--text); }

/* Result rows */
.cd-rows { display: flex; flex-direction: column; }
.cd-row { padding: 12px 0; border-top: 1px solid var(--grey-dim); display: flex; flex-direction: column; gap: 6px; }
.cd-row-line { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 6px 14px; align-items: start; }
.cd-row-line .cd-pill { justify-self: start; }
.cd-row-name { font-size: 14px; font-weight: bold; color: var(--text); overflow-wrap: anywhere; }
.cd-row-sub { font-size: 13px; color: var(--grey); line-height: 1.6; }
.cd-row-links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12px; }

/* Close matches for a typed name */
.cd-pickone { border-top: 1px solid var(--grey-dim); padding-top: 12px; }
.cd-pickone p { font-size: 13px; color: var(--text); margin: 0 0 10px; }
.cd-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-choices .cd-btn { text-transform: none; letter-spacing: 0.02em; font-size: 13px; color: var(--text); padding: 8px 12px; min-height: 40px; }
.cd-modenote { border-top: 1px solid var(--grey-dim); padding-top: 10px; margin: 0; }

/* Custom ROM question */
.cd-rom { border-top: 1px solid var(--grey-dim); padding: 14px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.cd-rom label { font-size: 13px; color: var(--text); line-height: 1.5; }
.cd-rom select {
  font-family: inherit; font-size: 14px; color: var(--text);
  background: rgba(128,128,128,0.06); border: 1px solid var(--grey-dim); border-radius: 0;
  padding: 8px 10px; min-height: 40px; max-width: 100%; width: 22em;
}
.cd-rom select option { background: var(--bg); color: var(--text); }
.cd-rom select:focus { outline: none; border-color: var(--red-dim); }
.cd-rom-q, .cd-rom-version { display: flex; flex-direction: column; gap: 8px; }
.cd-rom-q[hidden], .cd-rom-version[hidden] { display: none; }

.cd-advice { border-top: 1px solid var(--grey-dim); padding-top: 14px; margin-top: 10px; }
.cd-advice p { font-size: 14px; line-height: 1.7; color: var(--text); margin: 6px 0 0; }

/* The technical details, folded away */
.cd-details { margin-top: 18px; border: 1px solid var(--grey-dim); padding: 0 14px; }
.cd-details summary { cursor: pointer; padding: 12px 0; font-size: 12px; color: var(--grey); list-style-position: inside; }
.cd-details summary:hover { color: var(--red); }
.cd-details[open] { padding-bottom: 14px; }
.cd-details h3 { font-size: 10px; font-weight: normal; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 14px 0 8px; }
.cd-small { font-size: 11px; line-height: 1.6; color: var(--muted); margin: 0 0 8px; }
.cd-raw { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; font-size: 12px; margin: 0; }
.cd-raw dt { color: var(--grey); }
.cd-raw dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.cd-raw dd.cd-none { color: var(--muted); font-style: italic; }
.cd-notes { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.7; color: var(--text); }
.cd-log { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; font-size: 11px; }
.cd-log li { display: flex; gap: 10px; padding: 2px 0; min-width: 0; }
.cd-log .cd-mono { overflow-wrap: anywhere; color: var(--text); }
.cd-mark { flex: none; width: 4.5em; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; }
.cd-log .ok .cd-mark { color: var(--cd-ok); }
.cd-log .fail .cd-mark { color: var(--red); }

.cd-again { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 18px; font-size: 11px; color: var(--muted); }

/* Privacy statement */
.cd-privacy h3 { font-size: 11px; font-weight: normal; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red); margin: 18px 0 6px; }
.cd-privacy p, .cd-privacy li { font-size: 13px; line-height: 1.7; color: var(--text); }
.cd-privacy p { margin: 0 0 8px; }
.cd-privacy ul { margin: 0 0 8px; padding-left: 20px; }
.cd-privacy b { color: var(--text); }

@media (max-width: 760px) {
  .cd-card { padding: 16px; }
  .cd-go { width: 100%; }
  .cd-row-line { grid-template-columns: minmax(0, 1fr); }
  .cd-raw { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cd-raw dd { margin-bottom: 8px; }
  .cd-rom select { width: 100%; }
}

/* Printing ("Print result"): plain black on white, without the CRT effects,
   background or anything that only makes sense on screen. */
@media print {
  :root, html[data-theme] { --bg: #fff; --bg-panel: #fff; --text: #000; --muted: #444; --grey: #333; --grey-dim: #bbb; --grey-dark: #ddd; color-scheme: light; }
  body { background: #fff; padding: 0; }
  body::before, body::after, .bg-bubbles-canvas, .name-cursor { display: none !important; }
  .panel { width: 100%; box-shadow: none; border: 0; background: #fff; animation: none; }
  #intro, .cd-again, .cd-rom, .cd-pickone, .cd-row-links, .ai-notice { display: none !important; }
  .cd-card { border: 0; padding: 0; }
  .cd-log { max-height: none; overflow: visible; }
  a { color: inherit; text-decoration: none; }
}
