/* PrintCuro customer UI — dark consumer-utility theme (Phase 15.3.1).
 * Local-only, no external fonts/CDNs, design tokens (no repeated hex). */

:root {
  --color-bg: #0B0F1A;
  --color-bg-alt: #0E1420;
  --color-surface: #131A2B;
  --color-surface-2: #1A2338;
  --color-border: #262F45;
  --color-border-strong: #35405C;
  --color-text: #EEF1F8;
  --color-text-muted: #98A2BC;
  --color-text-faint: #6B7690;

  --color-accent: #5B8DEF;
  --color-accent-strong: #7BA3F5;
  --color-accent-weak: rgba(91, 141, 239, 0.14);
  --color-accent-glow: rgba(91, 141, 239, 0.28);

  --color-success: #34D399;
  --color-success-weak: rgba(52, 211, 153, 0.14);
  --color-success-strong: #58E6B4;

  --color-warning: #F0B94D;
  --color-warning-weak: rgba(240, 185, 77, 0.14);
  --color-warning-strong: #F5CB77;

  --color-danger: #F26D6D;
  --color-danger-weak: rgba(242, 109, 109, 0.14);

  --radius: 16px;
  --radius-sm: 11px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 0 1px var(--color-accent-weak), 0 8px 28px var(--color-accent-glow);
  --max-width: 560px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}
body {
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(91, 141, 239, 0.08), transparent 60%),
    var(--color-bg);
}

a { color: var(--color-accent-strong); }
:focus-visible { outline: 2px solid var(--color-accent-strong); outline-offset: 2px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Header / footer / language switcher ---------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  max-width: 720px;
  margin: 0 auto;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--color-text);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 1rem; color: var(--color-text); letter-spacing: -0.01em; }
.brand-product { font-size: 0.76rem; color: var(--color-text-muted); font-weight: 500; }

.lang-switcher { display: flex; gap: 0.3rem; }
.lang-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text-muted);
  border: 1px solid transparent;
}
.lang-switcher a:hover { color: var(--color-text); background: var(--color-surface-2); }
.lang-switcher a[aria-current="true"] {
  color: var(--color-accent-strong);
  background: var(--color-accent-weak);
  border-color: var(--color-accent-weak);
}

.site-footer {
  max-width: 720px;
  margin: 2.5rem auto 1.5rem;
  padding: 1.25rem 1.25rem 0;
  border-top: 1px solid var(--color-border);
}
.footer-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}
.footer-links a { color: var(--color-text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--color-accent-strong); text-decoration: underline; }
.footer-copy { margin: 0.75rem 0 0; font-size: 0.78rem; color: var(--color-text-faint); }

/* --- Layout / cards -------------------------------------------------------- */

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem 1.25rem 2rem;
}
.wrap-wide { max-width: 760px; }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  margin-bottom: 1.1rem;
}
.card-glow { box-shadow: var(--shadow-glow); border-color: var(--color-accent-weak); }
@media (max-width: 380px) {
  .card { padding: 1.25rem; }
}

.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  background: var(--color-accent-weak);
  color: var(--color-accent-strong);
}
.card-icon svg { width: 1.6rem; height: 1.6rem; }
.card-icon.success { background: var(--color-success-weak); color: var(--color-success-strong); }
.card-icon.warning { background: var(--color-warning-weak); color: var(--color-warning-strong); }

h1 { font-size: 1.55rem; margin: 0 0 0.5rem; letter-spacing: -0.015em; color: var(--color-text); }
h2 { font-size: 1.2rem; margin: 0 0 0.5rem; letter-spacing: -0.008em; color: var(--color-text); }
p { margin: 0 0 0.8rem; color: var(--color-text-muted); }
p:last-child { margin-bottom: 0; }
.lede { font-size: 1.03rem; color: var(--color-text-muted); }

/* --- Forms / buttons -------------------------------------------------------- */

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.45rem; color: var(--color-text); }
.field input[type="text"] {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  color: var(--color-text);
}
.field input[type="text"]::placeholder { color: var(--color-text-faint); }
.field input[type="text"]:focus { border-color: var(--color-accent); }
.field-hint { font-size: 0.83rem; color: var(--color-text-muted); margin-top: 0.4rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1.4rem;
  font-size: 1.02rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--color-accent);
  color: #0B0F1A;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--color-accent-strong); box-shadow: 0 0 0 4px var(--color-accent-weak); }
.btn:disabled { background: var(--color-border-strong); color: var(--color-text-faint); cursor: not-allowed; box-shadow: none; }
.btn-primary-strong { min-height: 58px; font-size: 1.08rem; }
.btn-secondary {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn-secondary:hover { background: var(--color-surface); border-color: var(--color-accent); box-shadow: none; }
.btn-link {
  width: auto;
  min-height: auto;
  display: inline-flex;
  padding: 0.4rem 0.1rem;
  background: none;
  color: var(--color-accent-strong);
  font-weight: 600;
}
.btn-link:hover { background: none; text-decoration: underline; box-shadow: none; }
.btn-row { display: flex; gap: 0.65rem; flex-wrap: wrap; margin-top: 0.5rem; }
.btn-row .btn { flex: 1 1 140px; }
.btn-sm { width: auto; min-height: auto; padding: 0.5rem 1rem; font-size: 0.9rem; }

/* --- Status banner ----------------------------------------------------------- */

.status-banner {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.92rem;
  border: 1px solid transparent;
}
.status-banner.info { background: var(--color-accent-weak); color: var(--color-text); border-color: rgba(91,141,239,0.25); }
.status-banner.success { background: var(--color-success-weak); color: var(--color-success-strong); border-color: rgba(52,211,153,0.25); }
.status-banner.warning { background: var(--color-warning-weak); color: var(--color-warning-strong); border-color: rgba(240,185,77,0.25); }
.status-banner.danger { background: var(--color-danger-weak); color: var(--color-danger); border-color: rgba(242,109,109,0.25); }

/* --- Maintenance notice ------------------------------------------------------ */

.maintenance-notice {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--color-warning-weak);
  border: 1px solid rgba(240, 185, 77, 0.3);
}
.maintenance-notice-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--color-warning-strong);
  margin: 0 0 0.5rem 0;
}
.maintenance-notice p {
  margin: 0 0 0.5rem 0;
  font-size: 0.92rem;
  color: var(--color-text);
}
.maintenance-notice p:last-child { margin-bottom: 0; }

/* --- Spinner / progress ------------------------------------------------------ */

.spinner {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  border: 0.18em solid var(--color-accent-weak);
  border-top-color: var(--color-accent-strong);
  border-radius: 50%;
  vertical-align: -0.2em;
  margin-right: 0.5em;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.search-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0 1.25rem;
}
.search-visual .search-ring {
  position: relative;
  width: 4.5rem; height: 4.5rem;
  border-radius: 50%;
  background: var(--color-accent-weak);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-accent-strong);
}
.search-visual .search-ring svg { width: 2.1rem; height: 2.1rem; }
.search-visual .search-ring::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--color-accent-weak);
  border-top-color: var(--color-accent-strong);
  animation: spin 1.1s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .search-visual .search-ring::before { animation-duration: 3s; }
}

.progress-indicator {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin: 1.25rem 0;
}
.progress-indicator span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--color-accent-strong);
  opacity: 0.3;
  animation: pulse 1.4s ease-in-out infinite;
}
.progress-indicator span:nth-child(2) { animation-delay: 0.2s; }
.progress-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .progress-indicator span { animation: none; opacity: 0.7; }
}

.connection-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.25rem 0;
  color: var(--color-text-muted);
}
.connection-visual svg { width: 1.6rem; height: 1.6rem; color: var(--color-accent-strong); }
.connection-visual .link-line {
  width: 2.5rem; height: 2px;
  background: linear-gradient(90deg, var(--color-accent-strong), var(--color-accent-weak));
  background-size: 200% 100%;
  animation: flow 1.6s linear infinite;
}
@keyframes flow { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .connection-visual .link-line { animation: none; }
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}
.progress-steps li { flex: 1; text-align: center; position: relative; }
.progress-steps li::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--color-border-strong);
  border-radius: 2px;
  margin-bottom: 0.4rem;
}
.progress-steps li.done::before, .progress-steps li.active::before { background: var(--color-accent-strong); }
.progress-steps li.active { color: var(--color-accent-strong); font-weight: 600; }

/* --- Key/value + printer detail ----------------------------------------------- */

.kv-table { width: 100%; border-collapse: collapse; }
.kv-table td { padding: 0.55rem 0; border-bottom: 1px solid var(--color-border); font-size: 0.94rem; }
.kv-table td:first-child { color: var(--color-text-muted); width: 45%; }
.kv-table tr:last-child td { border-bottom: none; }

.printer-detail {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  margin: 1rem 0;
}
.printer-detail.success { background: var(--color-success-weak); border-color: rgba(52,211,153,0.25); }
.printer-detail.warning { background: var(--color-warning-weak); border-color: rgba(240,185,77,0.25); }
.printer-detail-icon {
  width: 2.6rem; height: 2.6rem;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-surface);
  color: var(--color-accent-strong);
}
.printer-detail.success .printer-detail-icon { color: var(--color-success-strong); }
.printer-detail.warning .printer-detail-icon { color: var(--color-warning-strong); }
.printer-detail-icon svg { width: 1.4rem; height: 1.4rem; }
.printer-detail-text { min-width: 0; }
.printer-detail-model {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
  word-break: break-word;
}
.printer-detail-meta { font-size: 0.85rem; color: var(--color-text-muted); }

.printer-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  text-align: left;
  padding: 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.65rem;
  cursor: pointer;
  background: var(--color-surface-2);
  font: inherit;
  color: inherit;
}
.printer-card:hover { border-color: var(--color-accent); background: var(--color-accent-weak); }
.printer-card .printer-card-icon {
  width: 2.2rem; height: 2.2rem; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-surface);
  color: var(--color-accent-strong);
}
.printer-card .printer-card-icon svg { width: 1.25rem; height: 1.25rem; }
.printer-card .model { font-weight: 600; word-break: break-word; color: var(--color-text); }
.printer-card .transport { font-size: 0.82rem; color: var(--color-text-muted); }

.counter-value { font-size: 2rem; font-weight: 700; color: var(--color-text); }
.counter-label { color: var(--color-text-muted); font-size: 0.85rem; }

.warning-list { margin: 0; padding-left: 1.15rem; font-size: 0.9rem; color: var(--color-text-muted); }
.warning-list li { margin-bottom: 0.4rem; }

.reference-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-text);
}

/* --- Visual instruction cards (landing) ---------------------------------------- */

.instruction-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.4rem 0;
}
@media (max-width: 480px) {
  .instruction-row { grid-template-columns: 1fr; }
}
.instruction-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  padding: 1.1rem 0.9rem;
  text-align: center;
}
.instruction-card.emphasis {
  background: var(--color-accent-weak);
  border-color: rgba(91, 141, 239, 0.35);
  box-shadow: 0 0 0 1px rgba(91, 141, 239, 0.15);
}
.instruction-card .instruction-icon {
  width: 2.4rem; height: 2.4rem;
  margin: 0 auto 0.6rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-surface);
  color: var(--color-text-muted);
}
.instruction-card.emphasis .instruction-icon { background: var(--color-surface); color: var(--color-accent-strong); }
.instruction-card .instruction-icon svg { width: 1.3rem; height: 1.3rem; }
.instruction-card .instruction-title { font-weight: 700; font-size: 0.85rem; color: var(--color-text); letter-spacing: 0.01em; }
.instruction-card .instruction-body { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 0.2rem; }

/* --- Platform download cards -------------------------------------------------- */

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}
.platform-card {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 1rem 0.9rem;
  text-align: center;
  background: var(--color-surface-2);
}
.platform-card svg { width: 1.75rem; height: 1.75rem; color: var(--color-text-muted); margin-bottom: 0.5rem; }
.platform-card .platform-name { font-weight: 600; font-size: 0.92rem; color: var(--color-text); }
.platform-card .platform-status { font-size: 0.78rem; color: var(--color-text-muted); margin-top: 0.15rem; }

details.advanced-help {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
details.advanced-help summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
}
details.advanced-help[open] summary { margin-bottom: 0.5rem; }

/* --- Homepage -------------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}
.hero h1 { font-size: 2rem; margin-bottom: 0.35rem; }
.hero .tagline { font-size: 1.05rem; color: var(--color-text-muted); max-width: 30rem; margin: 0 auto 1.5rem; }
.hero .btn-row { justify-content: center; max-width: 22rem; margin: 0 auto; }

.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 560px) {
  .how-it-works { grid-template-columns: 1fr; }
}
.how-step { text-align: center; }
.how-step .how-number {
  width: 2.2rem; height: 2.2rem;
  margin: 0 auto 0.6rem;
  border-radius: 50%;
  background: var(--color-accent-weak);
  color: var(--color-accent-strong);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.how-step .how-title { font-weight: 700; color: var(--color-text); margin-bottom: 0.25rem; }
.how-step .how-body { font-size: 0.88rem; color: var(--color-text-muted); }

/* --- Help page ---------------------------------------------------------------- */

.help-section { margin-bottom: 1.4rem; }
.help-section h2 { font-size: 1.02rem; }
.help-intro { margin-bottom: 1.5rem; }

/* --- Supported-model lookup ---------------------------------------------------- */

.lookup-row { display: flex; gap: 0.6rem; }
.lookup-row input[type="text"] { flex: 1; }
.lookup-row .btn { width: auto; flex: 0 0 auto; }
.lookup-result {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.lookup-result.supported { background: var(--color-success-weak); color: var(--color-success-strong); }
.lookup-result.unsupported { background: var(--color-warning-weak); color: var(--color-warning-strong); }

[hidden] { display: none !important; }

@media (max-width: 380px) {
  body { font-size: 15px; }
}
