/* DeskNexus website – shared styles (index.html, reset.html) */
:root {
  --bg: #0a0c10; --bg-2: #0e1117; --panel: #12161d; --panel-2: #171c25;
  --border: #222834; --border-2: #2d3544;
  --text: #e8ebf2; --muted: #8f98ab; --faint: #5d6678;
  --accent: #14b8a6; --accent-2: #0d9488; --accent-3: #5eead4; --accent-ink: #032420;
  --blue: #60a5fa; --amber: #f59e0b; --ok: #22c55e; --danger: #f87171;
  --radius: 14px; --shadow: 0 30px 80px -20px rgba(0, 0, 0, .65);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 780px; }
.muted { color: var(--muted); }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 30px -8px rgba(20, 184, 166, .55); }
.btn-primary:hover { background: var(--accent-3); transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, .03); border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); background: rgba(255, 255, 255, .06); }
.btn[aria-disabled="true"], .btn:disabled { opacity: .55; pointer-events: none; }
.btn.is-loading { pointer-events: none; opacity: .85; transform: none; }
.btn .ico { width: 18px; height: 18px; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 16, .72); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
}
.logo-mark svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.logo.small { font-size: 15px; }
.logo.small .logo-mark { width: 24px; height: 24px; }
.logo.small .logo-mark svg { width: 14px; height: 14px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }

/* ---------- hero */
.hero { position: relative; padding: 88px 0 56px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.glow {
  position: absolute; width: 900px; height: 600px; left: 50%; top: -260px; transform: translateX(-30%);
  background: radial-gradient(closest-side, rgba(20, 184, 166, .28), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-grid > *, .split > * { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  font-size: 13px; color: var(--accent-3); background: rgba(20, 184, 166, .08); border: 1px solid rgba(20, 184, 166, .25);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(20,184,166,.18); }
.hero h1 { font-size: clamp(40px, 5.6vw, 64px); font-weight: 800; margin: 22px 0 20px; letter-spacing: -.035em; }
.grad { background: linear-gradient(90deg, var(--accent-3), var(--accent) 45%, var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: var(--muted); max-width: 540px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.meta { font-size: 13px; color: var(--faint); margin-top: 14px; min-height: 1.6em; }

/* product mock */
.mock {
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--border-2);
  border-radius: 16px; box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.02) inset; overflow: hidden;
  transform: perspective(1600px) rotateY(-6deg) rotateX(2deg);
}
.mock-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: rgba(0,0,0,.18); }
.mock-bar span { width: 11px; height: 11px; border-radius: 50%; background: #2c3341; }
.mock-bar b { margin-left: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mock-body { padding: 18px; }
.mock-this {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(20,184,166,.14), rgba(96,165,250,.06)); border: 1px solid rgba(20,184,166,.25);
}
.mock-label { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.mock-label.pad { margin: 18px 4px 10px; }
.mock-id { font-size: 24px; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.pill { font-size: 12px; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.pill.ok { background: rgba(34,197,94,.14); color: #4ade80; }
.mock-dev {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,.015); margin-bottom: 8px;
}
.mock-dev.dim { opacity: .6; }
.dev-ico { width: 34px; height: 26px; border-radius: 5px; border: 2px solid var(--border-2); position: relative; flex: none; }
.dev-ico::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 2px; background: var(--border-2); transform: translateX(-50%); }
.dev-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dev-txt b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-txt small { font-size: 12px; color: var(--faint); }
.status { font-size: 12px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.on { color: #4ade80; } .status.busy { color: var(--amber); } .status.sleep { color: var(--blue); }
.mini-btn { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); }
.mini-btn.muted { background: var(--border); color: var(--faint); }
.mock-stats {
  display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; background: rgba(0,0,0,.18);
}
.mock-stats span:first-child { color: #4ade80; }

.trust {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 80px;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border);
}
.trust div { background: var(--bg-2); padding: 22px 24px; display: flex; flex-direction: column; gap: 2px; }
.trust b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.trust span { font-size: 13px; color: var(--muted); }

/* ---------- sections */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.kicker { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; }
.section h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; }
.section-head p, .sub { color: var(--muted); font-size: 17px; margin-top: 14px; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  padding: 28px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border);
  transition: border-color .2s, transform .2s, background .2s;
}
.feature:hover { border-color: rgba(20,184,166,.4); transform: translateY(-3px); background: var(--panel-2); }
.f-ico {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(20,184,166,.1); border: 1px solid rgba(20,184,166,.22);
}
.f-ico svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; position: relative; }
.steps li { position: relative; padding: 30px 28px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.step-num {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; margin-bottom: 18px;
  font-weight: 700; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent-3), var(--accent-2));
}
.steps h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 15px; }

.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.split .btn { margin-top: 28px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li {
  position: relative; padding: 18px 20px 18px 56px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border);
  color: var(--muted); font-size: 15px;
}
.checks li b { color: var(--text); font-weight: 600; }
.checks li::before {
  content: ""; position: absolute; left: 18px; top: 19px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(20,184,166,.15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235eead4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.faq { display: grid; gap: 10px; }
.faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--panel); transition: border-color .2s; }
.faq details[open] { border-color: var(--border-2); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--muted); font-size: 15px; }

.cta-card {
  position: relative; overflow: hidden; text-align: center; padding: 64px 32px; border-radius: 20px;
  background: radial-gradient(ellipse at top, rgba(20,184,166,.22), transparent 65%), var(--panel);
  border: 1px solid rgba(20,184,166,.25);
}
.cta-card p:not(.meta) { color: var(--muted); font-size: 17px; margin: 14px 0 30px; }

.footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- auth card (reset.html) */
.auth { min-height: calc(100vh - 67px); display: grid; place-items: center; padding: 48px 16px; position: relative; overflow: hidden; }
.auth .glow { top: -320px; transform: translateX(-50%); }
.auth-card {
  position: relative; width: 420px; max-width: 100%; padding: 36px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--border-2); box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.auth-card .sub { font-size: 15px; margin: 0 0 8px; }
.field { margin-top: 18px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 10px; font: inherit; font-size: 15px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border-2); transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20,184,166,.2); }
.auth-card .btn { width: 100%; margin-top: 24px; }
.msg { min-height: 22px; margin-top: 14px; font-size: 14px; color: var(--danger); }
.done-ico {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(34,197,94,.14); color: #4ade80; font-size: 26px; font-weight: 700;
}

/* ---------- responsive */
@media (max-width: 960px) {
  .hero { padding-top: 56px; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 48px; }
  .mock { transform: none; max-width: 560px; }
  .grid3, .steps { grid-template-columns: 1fr 1fr; }
  .trust { grid-template-columns: 1fr 1fr; margin-top: 56px; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .section { padding: 72px 0; }
  .grid3, .steps { grid-template-columns: 1fr; }
  .cta-row .btn { width: 100%; }
  .mock-stats span:nth-child(n+3) { display: none; }
  .mock-dev .mini-btn { display: none; }
  .cta-card { padding: 48px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .feature { transition: none; }
}

/* ---------- language picker */
.lang { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); margin-inline-start: 4px; }
.lang svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; pointer-events: none; }
.lang select {
  appearance: none; -webkit-appearance: none; background: transparent; color: var(--muted); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; max-width: 140px;
}
.lang select:hover, .lang select:focus { color: var(--text); border-color: var(--muted); outline: none; }
.lang select option { background: var(--panel); color: var(--text); }

/* ---------- right-to-left languages */
[dir="rtl"] .nav-links { margin-left: 0; margin-right: auto; }
[dir="rtl"] .checks li { padding: 18px 56px 18px 20px; }
[dir="rtl"] .checks li::before { left: auto; right: 18px; }
[dir="rtl"] .mock { transform: perspective(1600px) rotateY(6deg) rotateX(2deg); }
[dir="rtl"] .glow { transform: translateX(-70%); }
[dir="rtl"] .mock, [dir="rtl"] .mock-id, [dir="rtl"] .trust b, [dir="rtl"] .mock-stats { direction: ltr; }
[dir="rtl"] .mock-dev, [dir="rtl"] .mock-this { text-align: left; }
@media (max-width: 960px) { [dir="rtl"] .mock { transform: none; } }
@media (max-width: 680px) { .lang select { max-width: 110px; } .nav-inner { gap: 12px; } }

/* ---------- CJK headings: break at phrase boundaries, slightly smaller hero */
:lang(ja) :is(h1, h2, h3), :lang(zh) :is(h1, h2, h3), :lang(ko) :is(h1, h2, h3) { word-break: auto-phrase; line-break: strict; }
:lang(ja) .hero h1, :lang(zh) .hero h1, :lang(ko) .hero h1 { font-size: clamp(34px, 4.4vw, 50px); letter-spacing: -.01em; }
@media (max-width: 480px) { .nav .btn.dl { display: none; } }

/* ---------- account page */
.hidden { display: none !important; }
.small { font-size: 13px; }
.acct-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.acct-head h1 { font-size: 32px; font-weight: 700; }
.acct-head p { margin-top: 6px; }
.notice { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 18px; border-radius: 12px;
  background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .35); color: #fbbf24; }
.acct-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 18px; }
.panel-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.panel-card h2 { font-size: 16px; font-weight: 600; margin-bottom: 14px; }
.plan-name { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 4px; }
.pc-list { display: grid; gap: 8px; }
.pc-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); border-inline-start-width: 4px; }
.pc-row.ok { border-color: rgba(34, 197, 94, .45); border-inline-start-color: var(--ok); }
.pc-row.busy { border-color: rgba(245, 158, 11, .45); border-inline-start-color: var(--amber); }
.pc-row.off { border-color: rgba(248, 113, 113, .35); border-inline-start-color: var(--danger); }
.pc-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--danger); }
.pc-row.ok .pc-dot { background: var(--ok); } .pc-row.busy .pc-dot { background: var(--amber); }
.pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
table.history { width: 100%; border-collapse: collapse; font-size: 14px; }
table.history th, table.history td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.history th { font-size: 12px; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.live-badge { font-size: 12px; font-weight: 600; color: #4ade80; background: rgba(34, 197, 94, .12); padding: 2px 8px; border-radius: 999px; }
.knock-dlg { border: 1px solid var(--border-2); border-radius: 16px; background: var(--panel); color: var(--text); padding: 22px; width: 420px; max-width: calc(100vw - 32px); }
.knock-dlg::backdrop { background: rgba(3, 5, 8, .7); }
.knock-dlg h3 { font-size: 18px; margin-bottom: 6px; }
.knock-dlg .field input { width: 100%; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.msg.ok-msg { color: #4ade80; }
.loading-line { display: flex; align-items: center; gap: 10px; color: var(--muted); }
@media (max-width: 860px) { .acct-grid { grid-template-columns: 1fr; } }
