/* ToolGalli — shared styles. Mobile-first, no framework. */
:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #1c2138;
  --muted: #5b6175;
  --line: #e6e8f0;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-soft: #eef0fe;
  --accent: #f59e0b;
  --ok: #16a34a;
  --bad: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20,23,40,.06), 0 8px 24px rgba(20,23,40,.06);
  --maxw: 1080px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #7c74f0);
  display: grid; place-items: center; color: #fff; font-size: 16px;
}
.logo b { color: var(--brand-dark); }
.nav a { color: var(--muted); font-weight: 600; font-size: .95rem; margin-left: 18px; }
.nav a:hover { color: var(--ink); text-decoration: none; }

/* Privacy badge */
.privacy {
  display: inline-flex; align-items: center; gap: 7px;
  background: #ecfdf3; color: #157347; border: 1px solid #c5f0d3;
  padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600;
}

/* Hero */
.hero { text-align: center; padding: 46px 0 24px; }
.hero p.lead { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto 18px; }

/* Tool grid */
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 8px 0 40px; }
@media (min-width: 620px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 920px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
.tool-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease; color: var(--ink);
}
.tool-card:hover { transform: translateY(-3px); text-decoration: none; box-shadow: 0 10px 30px rgba(20,23,40,.1); }
.tool-card .ic { font-size: 26px; width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; margin-bottom: 12px; }
.tool-card h3 { margin-bottom: 4px; font-size: 1.12rem; }
.tool-card p { color: var(--muted); font-size: .92rem; margin: 0; }

/* Sections */
.section { padding: 26px 0; }
.features { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feature h3 { font-size: 1.02rem; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }

/* Breadcrumb */
.crumb { font-size: .85rem; color: var(--muted); padding: 16px 0 0; }
.crumb a { color: var(--muted); }

/* Tool page layout */
.tool-head { padding: 6px 0 18px; }
.tool-head .privacy { margin-bottom: 14px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 22px;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input[type=text], input[type=number], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; color: var(--ink); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row.two { grid-template-columns: 1fr 1fr; } .row.three { grid-template-columns: 1fr 1fr 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: #fff; border: 0; border-radius: 10px;
  padding: 12px 20px; font: inherit; font-weight: 700; cursor: pointer;
  transition: background .12s ease;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: #eef0f5; color: var(--ink); }
.btn.secondary:hover { background: #e2e5ee; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Drop zone */
.drop {
  border: 2px dashed var(--line); border-radius: var(--radius); background: #fbfbfe;
  padding: 30px 18px; text-align: center; cursor: pointer; transition: border-color .12s, background .12s;
}
.drop.drag { border-color: var(--brand); background: var(--brand-soft); }
.drop .big { font-size: 30px; margin-bottom: 6px; }
.drop .sub { color: var(--muted); font-size: .9rem; }

.note { padding: 12px 14px; border-radius: 10px; font-size: .9rem; margin: 12px 0; }
.note.info { background: #eff6ff; border: 1px solid #cfe0fd; color: #1e40af; }
.note.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.note.err  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.note.ok   { background: #ecfdf3; border: 1px solid #c5f0d3; color: #157347; }
.hidden { display: none !important; }

.preview-canvas { max-width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; touch-action: none; }
.muted { color: var(--muted); }
.kvs { font-size: .9rem; color: var(--muted); }
.kvs b { color: var(--ink); }

/* FAQ / content */
.content h2 { margin-top: 1.2em; }
.content { color: #333a52; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px; margin-bottom: 10px; }
details summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
details p { padding-bottom: 8px; margin: 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; margin-top: 30px; }
.site-footer .wrap { padding: 26px 18px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.site-footer .links a { color: var(--muted); margin-right: 16px; font-size: .9rem; }
.site-footer small { color: var(--muted); }
