/* Lookforit fresh v1 — premium editorial design system.
   No webfonts, no icon font: system stacks + inline SVG only.
   Palette: ink navy, warm paper, muted gold accent. */
:root {
  --ink: #0b1220;
  --ink-soft: #1a2438;
  --paper: #faf9f6;
  --card: #ffffff;
  --text: #1c2430;
  --muted: #5b6675;
  --line: #e6e1d8;
  --gold: #b9975b;
  --gold-soft: #f3ead6;
  --indigo: #4f46e5;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 18, 32, 0.08);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
}
a { color: var(--indigo); }
a:hover { text-decoration: none; }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: 0.9rem 1.25rem;
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}
.logo {
  font-family: var(--serif); font-size: 1.55rem; font-weight: 700;
  color: var(--ink); text-decoration: none; letter-spacing: -0.02em;
}
.logo span { color: var(--gold); }
.site-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-left: auto; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { color: var(--gold); }
.theme-toggle {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  width: 2.4rem; height: 2.4rem; cursor: pointer; font-size: 1.05rem; line-height: 1;
}
.header-search { display: flex; gap: 0.4rem; }
.header-search input {
  border: 1px solid var(--line); border-radius: 999px; padding: 0.5rem 0.9rem;
  background: var(--card); font: inherit; width: 11rem;
}
.header-search button, .button {
  border: 0; border-radius: 999px; padding: 0.55rem 1.2rem; cursor: pointer;
  background: var(--ink); color: #fff; font: inherit; font-weight: 700; text-decoration: none;
  display: inline-block;
}
.header-search button:hover, .button:hover { background: var(--ink-soft); }
.button.primary { background: var(--gold); color: #1a1405; }
.button.primary:hover { background: #a98548; }
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.nav-toggle { display: none; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 0.4rem 0.7rem; cursor: pointer; font-size: 1.2rem; }

/* Layout */
.page-wrap { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.crumbs { max-width: 1120px; margin: 0 auto; padding: 1rem 1.25rem 0; color: var(--muted); font-size: 0.9rem; }
.crumbs a { color: var(--muted); }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.25; letter-spacing: -0.015em; }
h1 { font-size: 2.6rem; margin: 0.4rem 0 0.8rem; }
h2 { font-size: 1.8rem; margin: 2.2rem 0 0.7rem; }
h3 { font-size: 1.25rem; margin: 1.4rem 0 0.4rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 44rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem;
  font-weight: 800; color: var(--gold); margin: 0;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0b1220 0%, #16223c 55%, #2a2350 100%);
  color: #fff; border-radius: 20px; padding: 3rem 2.5rem; overflow: hidden; position: relative;
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px;
  border-radius: 50%; background: radial-gradient(circle, rgba(185, 151, 91, 0.45), transparent 70%);
}
.hero h1 { color: #fff; font-size: 3rem; max-width: 34rem; position: relative; z-index: 1; }
.hero p { color: #cbd5e1; max-width: 36rem; position: relative; z-index: 1; }
.hero .eyebrow { color: #e8c468; position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.4rem; position: relative; z-index: 1; }
.hero-actions .button.ghost { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.hero-search { display: flex; gap: 0.5rem; margin-top: 1.6rem; max-width: 34rem; position: relative; z-index: 1; }
.hero-search input {
  flex: 1; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px;
  padding: 0.8rem 1.1rem; font: inherit; background: rgba(255, 255, 255, 0.12); color: #fff;
}
.hero-search input::placeholder { color: #cbd5e1; }
.hero-search button { background: var(--gold); color: #1a1405; }
.hero-note { font-size: 0.9rem; color: #94a3b8; margin-top: 0.7rem; }

/* Cards / grids */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; margin-top: 1.2rem; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow); transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--gold); }
.card h3 { margin-top: 0; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card .icon { font-size: 1.6rem; }
.empty-state {
  border: 1px dashed var(--gold); background: var(--gold-soft); border-radius: var(--radius);
  padding: 2rem; text-align: center; margin-top: 1.2rem;
}
.empty-state p { color: var(--muted); max-width: 34rem; margin: 0.5rem auto; }

/* Key box, forms */
.key-box {
  border-left: 4px solid var(--gold); background: var(--gold-soft);
  padding: 1rem 1.2rem; border-radius: 0 12px 12px 0; margin: 1.4rem 0;
}
form .row { display: grid; gap: 0.8rem; max-width: 36rem; }
input[type="text"], input[type="email"], input[type="url"], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem 0.9rem;
  font: inherit; background: var(--card); color: var(--text);
}
.form-note { color: var(--muted); font-size: 0.92rem; }

/* FAQ */
details {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 0.9rem 1.1rem; margin: 0.6rem 0;
}
details summary { cursor: pointer; font-weight: 700; color: var(--ink); }
details summary::-webkit-details-marker { color: var(--gold); }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; background: var(--card); border-radius: 12px; overflow: hidden; }
th { background: var(--ink); color: #fff; text-align: left; padding: 0.7rem 0.9rem; }
td { padding: 0.7rem 0.9rem; border-top: 1px solid var(--line); }

/* Footer */
.site-footer { background: var(--ink); color: #cbd5e1; margin-top: 2rem; }
.footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 2.5rem 1.25rem;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1.5rem;
}
.footer-brand { font-family: var(--serif); font-size: 1.4rem; color: #fff; }
.footer-brand span { color: var(--gold); }
.site-footer h4 { color: #fff; margin: 0 0 0.6rem; font-family: var(--sans); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0.35rem 0; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #e8c468; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); text-align: center; padding: 1rem; font-size: 0.9rem; color: #94a3b8; }

/* Reveal + back to top */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: none; }
#to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60; display: none;
  border: 0; border-radius: 999px; width: 2.8rem; height: 2.8rem; cursor: pointer;
  background: var(--ink); color: #fff; font-size: 1.2rem; box-shadow: var(--shadow);
}

/* Dark mode */
html[data-theme="dark"] {
  --paper: #0f172a; --card: #1a2438; --text: #e2e8f0; --muted: #94a3b8;
  --line: #2b3a55; --gold-soft: #2a2416;
}
html[data-theme="dark"] .site-header { background: rgba(15, 23, 42, 0.92); }
html[data-theme="dark"] .logo, html[data-theme="dark"] h1, html[data-theme="dark"] h2,
html[data-theme="dark"] h3, html[data-theme="dark"] .site-nav a, html[data-theme="dark"] .card h3 a { color: #f1f5f9; }
html[data-theme="dark"] .button.ghost { color: #f1f5f9; }
html[data-theme="dark"] details summary { color: #f1f5f9; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; flex-direction: column; gap: 0.5rem; }
  .site-nav.open { display: flex; }
  .header-search { width: 100%; }
  .header-search input { flex: 1; width: auto; }
  .hero { padding: 2rem 1.4rem; }
  .hero h1 { font-size: 2.1rem; }
  h1 { font-size: 2rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card { transition: none; }
}

/* v2: free-tool widgets */
.tool-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); margin-top: 1.2rem; }
.tool-panel label { display: block; font-weight: 600; margin: 0.7rem 0 0.3rem; }
.tool-panel label input[type="checkbox"] { width: auto; }
.tool-panel p label { display: inline-block; margin-right: 1rem; font-weight: 400; }
input[type="number"], input[type="color"], input[type="range"] { border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem 0.9rem; font: inherit; background: var(--card); color: var(--text); }
input[type="color"] { padding: 0.2rem; height: 3rem; width: 5rem; }
input[type="range"] { width: 100%; padding: 0; }
.tool-output { background: var(--gold-soft); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin-top: 1rem; white-space: pre-wrap; min-height: 3rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.8rem; margin-top: 1rem; }
.stat { background: var(--gold-soft); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem; text-align: center; }
.stat strong { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }
.stat span { font-size: 0.85rem; color: var(--muted); }
.swatch-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0.5rem 0 1rem; }
.swatch { border: 1px solid var(--line); border-radius: 10px; width: 6.5rem; height: 4.5rem; cursor: pointer; position: relative; padding: 0; }
.swatch span { position: absolute; left: 0; right: 0; bottom: 0.2rem; font-size: 0.72rem; background: rgba(255,255,255,0.85); color: #1c2430; }
.gradient-preview { height: 6rem; border-radius: 12px; border: 1px solid var(--line); margin: 1rem 0; }
.timer-display { font-family: var(--serif); font-size: 4rem; text-align: center; color: var(--ink); margin: 1rem 0 0; }
.meter { height: 0.7rem; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 1rem; }
.meter div { height: 100%; background: var(--gold); width: 0; transition: width 0.3s ease; }
.md-preview { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.4rem; margin-top: 1rem; }
.md-preview pre { background: var(--ink); color: #e2e8f0; padding: 1rem; border-radius: 8px; overflow-x: auto; }
.md-preview code { background: var(--gold-soft); padding: 0.1rem 0.35rem; border-radius: 4px; }
.md-preview pre code { background: none; padding: 0; }
.search-result { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; margin: 0.6rem 0; }
.search-result h3 { margin: 0 0 0.2rem; }
.search-result p { margin: 0; color: var(--muted); }
html[data-theme="dark"] .stat strong, html[data-theme="dark"] .timer-display { color: #f1f5f9; }

/* v2-extra: diff + mark */
.diff-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92rem; }
.diff-add { background: #e6f4ea; color: #14532d; }
.diff-del { background: #fde8e8; color: #7f1d1d; }
.diff-same { color: var(--muted); }
mark { background: var(--gold); color: #1a1405; padding: 0 0.15rem; border-radius: 3px; }
html[data-theme="dark"] .diff-add { background: #14351f; color: #bbf7d0; }
html[data-theme="dark"] .diff-del { background: #3d1515; color: #fecaca; }

/* polish 2026-10-25: category icons, chip links, balanced 4-card grids, stacked tool forms */
.card .cat-icon { display: block; width: 2.1rem; height: 2.1rem; color: var(--gold); margin-bottom: 0.7rem; }
.card .cat-icon svg { width: 100%; height: 100%; }
.cat-links a { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 0.28rem 0.75rem; margin: 0.2rem 0.25rem 0.2rem 0; text-decoration: none; color: var(--ink); }
.cat-links a:hover { border-color: var(--gold); }
@media (min-width: 900px) { .grid.grid-4 { grid-template-columns: repeat(2, 1fr); } }
.tool-panel .row { display: grid; gap: 0.2rem; max-width: 36rem; }
.tool-panel .row label { margin: 0.7rem 0 0.2rem; }
.tool-panel .row label input[type="number"], .tool-panel .row label input[type="text"], .tool-panel .row label input[type="url"], .tool-panel .row label input[type="search"], .tool-panel .row label select, .tool-panel .row label textarea { display: block; width: 100%; max-width: 28rem; margin-top: 0.35rem; }
