/* assets/css/main.css */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --container-width: 1200px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; background: var(--bg); color: var(--text); }
h1 { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: 26px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0 0 16px; color: #334155; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }
.container-main { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container-blog, .container-legal { max-width: 850px; margin: 0 auto; padding: 0 24px; }
.container-contact { max-width: 760px; margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff; padding: 8px 16px; z-index: 100; border-radius: 6px; }
.skip-link:focus { left: 12px; top: 12px; }
main#main { min-height: 40vh; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { font-weight: 800; font-size: 1.35rem; color: var(--text); display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-icon { width: 28px; height: 28px; background: var(--primary); color: #fff; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--text-muted); font-weight: 500; font-size: 14px; text-decoration: none; }
.nav a:hover { color: var(--text); text-decoration: none; }
.header-auth-link { color: var(--primary) !important; font-weight: 700 !important; border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; }
.header-auth-link:hover { border-color: var(--primary); text-decoration: none !important; }
.container-auth { max-width: 760px; margin: 0 auto; padding: 48px 24px; }
.hidden { display: none !important; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 24px 0; box-shadow: var(--shadow); }
.auth-card h2 { margin-top: 0; }
.status-pill { display: inline-block; background: #eff6ff; color: #1d4ed8; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; }
.auth-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; border-bottom: 1px solid var(--border); }
.auth-tab { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--text-muted); cursor: pointer; font: inherit; font-weight: 600; padding: 8px 10px; }
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-form { display: grid; gap: 14px; margin-top: 16px; }
.auth-form h3 { margin: 0; }
.auth-form .contact-field { display: grid; gap: 6px; }
.auth-form input { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font: inherit; width: 100%; }


/* Hero */
.hero { padding: 64px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 44px; line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero p { font-size: 1.15rem; color: var(--text-muted); margin: 0 0 32px; max-width: 480px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-visual { text-align: center; }
.hero-visual svg { max-width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--border); background: #fff; }
.btn-primary { background: var(--primary); color: #fff; border: none; padding: 14px 28px; border-radius: 8px; font-weight: 600; font-size: 1rem; cursor: pointer; transition: background 0.2s; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn-primary:hover { background: var(--primary-hover); text-decoration: none; color: #fff; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); padding: 14px 28px; border-radius: 8px; font-weight: 600; font-size: 1rem; cursor: pointer; transition: background 0.2s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.btn-secondary:hover { background: #f1f5f9; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); padding: 8px 12px; border-radius: 8px; cursor: pointer; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 32px; }
.feature-item { text-align: center; padding: 12px; }
.feature-item svg { width: 32px; height: 32px; color: var(--primary); margin-bottom: 12px; }
.feature-item h3 { margin: 0 0 4px; font-size: 1rem; }
.feature-item p { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* Tool grid/cards */
.section-title { margin: 48px 0 24px; font-size: 26px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 24px; }
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; transition: all 0.2s; text-decoration: none; color: inherit; }
.tool-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.tool-card .icon { width: 40px; height: 40px; background: #eff6ff; color: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; font-weight: bold; }
.tool-card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--text); }
.tool-card p { margin: 0; color: var(--text-muted); font-size: 0.9rem; flex-grow: 1; }
.lede { color: var(--text-muted); font-size: 1.05rem; margin-top: 0; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 80px; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px; }
.footer-grid h4 { margin: 0 0 16px; font-size: 13px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 8px 0; }
.footer-grid a { color: var(--text-muted); font-size: 14px; text-decoration: none; }
.footer-grid a:hover { color: var(--primary); }
.footer-bottom { margin-top: 48px; border-top: 1px solid var(--border); padding-top: 24px; color: var(--text-muted); font-size: 13px; text-align: center; }
.muted { color: var(--text-muted); }

/* Prose / Legal */
.prose { max-width: 800px; background: var(--surface); padding: 40px; border-radius: var(--radius); border: 1px solid var(--border); margin: 32px auto; }
.prose h1 { font-size: 2rem; margin-top: 0; }
.prose h2 { margin-top: 2em; font-size: 1.25rem; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin: 8px 0; }
.prose code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.post-list { list-style: none; padding: 0; }
.post-list li, .post-item { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.post-item { display: block; padding: 24px 0; }
.post-item h2 { margin: 0 0 8px; font-size: 22px; }
.post-item h2 a { color: var(--text); text-decoration: none; }
.post-item h2 a:hover { color: var(--primary); }
.post-desc { font-size: 15px; color: var(--text-muted); margin-bottom: 12px; }
.post-meta { font-size: 13px; color: #94a3b8; }
.post-date { color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 16px; }
.prose li { margin-bottom: 8px; }
.cookie-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.9rem; }
.cookie-table th, .cookie-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.cookie-table th { background: #f8fafc; color: var(--text-muted); }

@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding: 40px 0; }
  .hero p { margin: 0 auto 32px; }
  .hero-actions { justify-content: center; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
  .prose { padding: 24px; border: none; background: transparent; margin: 16px auto; }
  .post-list li { flex-direction: column; gap: 4px; }
}

.hidden-table { display: none; }
.contact-form { display: grid; gap: 16px; margin-top: 24px; }
.contact-field { display: grid; gap: 6px; }
.contact-field label { font-weight: 600; font-size: 0.95rem; }
.contact-field input, .contact-field textarea, .contact-field select { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 12px; font: inherit; background: #fff; color: var(--text); }
.contact-field textarea { resize: vertical; }
.form-status { min-height: 1.5em; margin: 0; font-weight: 600; }
.form-status.success { color: #15803d; }
.form-status.error { color: #b91c1c; }
.contact-privacy { font-size: 13px; color: var(--text-muted); margin: 0; }
.contact-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.page-section { padding-top: 48px; padding-bottom: 24px; }
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.dz-hint-spaced { margin-top: 16px; }
.btn-inline-cta { display: inline-flex; margin-top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tool-options legend.sr-only { font-size: inherit; }
.cookie-consent { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999; background: #0f172a; color: #fff; padding: 16px 24px; }
.cookie-consent-inner { max-width: var(--container-width); margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.cookie-consent a { color: #93c5fd; text-decoration: underline; }
.cookie-consent button { background: var(--primary); color: #fff; border: 0; border-radius: 6px; padding: 8px 16px; font-weight: 600; cursor: pointer; }
.admin-page { padding-top: 48px; padding-bottom: 48px; }
.admin-card { border: 1px solid var(--border); border-radius: 12px; background: #fff; padding: 24px; margin: 20px 0; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05); }
.admin-card h2, .admin-toolbar h2 { margin-top: 0; }
.admin-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 24px 0 12px; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.admin-table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table-wrap th, .admin-table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.admin-table-wrap th { background: #f8fafc; color: var(--text-muted); font-weight: 700; white-space: nowrap; }
.admin-table-wrap tr:last-child td { border-bottom: 0; }
.admin-table-wrap td { word-break: break-word; }
.admin-check { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; font-weight: 600; cursor: pointer; }
.admin-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primary); }
.admin-qr { width: 256px; max-width: 100%; margin: 16px 0; border: 1px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden; }
.admin-qr img { display: block; width: 100%; height: auto; }
.admin-qr.is-blurred img { filter: blur(14px); opacity: 0.5; }
.admin-bar { position: relative; z-index: 1000; background: #0f172a; color: #e2e8f0; font-size: 13px; }
.admin-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.admin-bar nav { display: flex; gap: 16px; flex-wrap: wrap; }
.admin-bar a { color: #bfdbfe; text-decoration: none; font-weight: 600; }
.admin-bar a:hover { text-decoration: underline; }
@media (max-width: 768px) {
  .admin-card { padding: 18px; }
  .admin-toolbar { align-items: flex-start; }
  .admin-table-wrap th, .admin-table-wrap td { padding: 8px 10px; }
}
