/* ToolsDo — design system extracted from ToolsDo.dc.html (Claude design) */

/* ---------- Fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-serif-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/source-serif-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Base ---------- */
:root {
  --accent: #D97757;
  --accent-2: #E8A87C;
  --accent-shadow: rgba(217, 119, 87, 0.25);
  --bg: #FAF7F2;
  --text: #3D3929;
  --text-2: #4E4636;
  --text-muted: #6E6552;
  --muted: #A39C8B;
  --border: #EDE6DA;
  --border-2: #E8E0D2;
  --chip: #F3EDE2;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  font-family: var(--sans);
  color: var(--text);
}
/* Theme accents — design ke Tweaks panel ke 4 variants */
html[data-accent="terracotta"] { --accent: #D97757; --accent-shadow: rgba(217, 119, 87, 0.25); }
html[data-accent="gold"]       { --accent: #C98A3B; --accent-shadow: rgba(201, 138, 59, 0.25); }
html[data-accent="rose"]       { --accent: #B8695E; --accent-shadow: rgba(184, 105, 94, 0.25); }
html[data-accent="olive"]      { --accent: #8FA36B; --accent-shadow: rgba(143, 163, 107, 0.25); }

input:focus, textarea:focus, select:focus { outline: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Layout ---------- */
.app { display: flex; height: 100vh; height: 100dvh; }
main.main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #FCFAF6 0%, #FAF5EC 100%);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 14px 20px; cursor: pointer; text-decoration: none; color: inherit; }
.brand-logo {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #FFF; font-family: var(--serif); font-size: 18px; font-weight: 600;
}
.brand-name { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.brand-badge { margin-left: auto; font-size: 11px; color: var(--muted); background: var(--chip); border-radius: 20px; padding: 3px 9px; white-space: nowrap; }

.sidebar-search { padding: 0 16px 12px 16px; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: #FFFFFF; border: 1px solid var(--border-2); border-radius: 10px;
  padding: 9px 12px; box-shadow: 0 1px 2px rgba(120,100,70,0.05);
}
.search-box input {
  border: none; background: transparent; font-family: var(--sans);
  font-size: 13.5px; color: var(--text); width: 100%;
}
.search-box input::placeholder { color: var(--muted); }

.tool-list { flex: 1; overflow-y: auto; padding: 0 10px 20px 10px; }
.no-results { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 13px; }
.cat-group { margin-top: 14px; }
.cat-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 0 10px 6px 10px;
}
.tool-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 8px; cursor: pointer;
  margin-bottom: 1px; text-decoration: none; color: var(--text-2);
}
.tool-item:hover { background: var(--chip); }
.tool-item.active { background: #F3E7D7; }
.tool-item.active .tool-item-name { color: #8A4B2A; }
.tool-item.soon { cursor: default; opacity: 0.45; }
.tool-item.soon:hover { background: transparent; }
.tool-chip {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
}
.tool-item-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soon-tag { margin-left: auto; font-size: 9px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: var(--chip); border-radius: 8px; padding: 2px 6px; flex-shrink: 0; }

/* ---------- Hero (home) ---------- */
.hero {
  background: linear-gradient(160deg, #FBEFE3 0%, #F9E3D3 45%, #F6EFE4 100%);
  border-bottom: 1px solid #F0E5D5;
  padding: 64px 56px 56px 56px;
}
.hero-inner { max-width: 860px; margin: 0 auto; text-align: center; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.7); border: 1px solid #EFDFC9;
  border-radius: 20px; padding: 5px 14px; font-size: 12.5px; color: #8A7A5C; margin-bottom: 20px;
}
.hero-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
.hero h1 {
  font-family: var(--serif); font-size: 46px; font-weight: 500;
  letter-spacing: -0.02em; margin: 0 0 14px 0; line-height: 1.15;
}
.hero p { font-size: 16px; color: var(--text-muted); margin: 0 auto 28px auto; max-width: 480px; line-height: 1.6; }
.hero-search {
  display: flex; align-items: center; gap: 8px;
  background: #FFFFFF; border: 1px solid #EBDCC6; border-radius: 14px;
  padding: 14px 18px; max-width: 520px; margin: 0 auto;
  box-shadow: 0 8px 24px rgba(180,130,80,0.10);
}
.hero-search input {
  border: none; background: transparent; font-family: var(--sans);
  font-size: 15px; color: var(--text); width: 100%;
}
.hero-search input::placeholder { color: var(--muted); }

/* ---------- Home content ---------- */
.home-content { max-width: 980px; margin: 0 auto; padding: 44px 40px 64px 40px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.section-head h2, .home-content h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 0; }
.section-head .sub { font-size: 13px; color: var(--muted); }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tool-card {
  background: #FFFFFF; border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; cursor: pointer; transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
  text-decoration: none; color: inherit; display: block;
}
.tool-card:hover {
  box-shadow: 0 8px 20px rgba(160,120,70,0.12);
  transform: translateY(-2px);
  border-color: #E8CDB4;
}
.tool-card-chip {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; margin-bottom: 12px;
}
.tool-card-name { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.tool-card-cat { font-size: 12.5px; color: var(--muted); }

.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-chip {
  display: flex; align-items: center; gap: 8px;
  border-radius: 22px; padding: 9px 16px; font-size: 13.5px; font-weight: 500;
  cursor: pointer; text-decoration: none;
}
.cat-chip:hover { filter: brightness(0.97); }
.cat-chip .count { opacity: 0.6; font-size: 12px; }

/* ---------- Tool page ---------- */
.tool-page { max-width: 880px; margin: 0 auto; padding: 36px 40px 64px 40px; animation: fadeUp 0.25s ease; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 26px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); text-decoration: none; cursor: pointer; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .current { color: var(--text); }

.tool-header { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.tool-header-chip {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 600;
}
.tool-header h1 { font-family: var(--serif); font-size: 30px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.tool-header .meta { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.tool-desc { font-size: 15px; color: var(--text-muted); line-height: 1.6; margin: 14px 0 30px 0; max-width: 560px; }

/* Workspace: input/result panels */
.workspace { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.workspace.single { grid-template-columns: 1fr; }
.panel {
  background: #FFFFFF; border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; min-height: 260px; display: flex; flex-direction: column; gap: 12px;
}
.panel-result {
  background: linear-gradient(180deg, #FDF6EE 0%, #FBEFE3 100%);
  border: 1px solid #F0E0CC;
}
.panel-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.panel-result .panel-label { color: #B98E63; }
.panel-placeholder {
  flex: 1; display: flex; align-items: center; justify-content: center;
  font-family: monospace; font-size: 12px; color: #B98E63; text-align: center;
}

/* Form controls (design language) */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field input[type="text"], .field input[type="number"], .field input[type="date"], .field select, .field textarea {
  font-family: var(--sans); font-size: 14px; color: var(--text);
  background: #FCFAF6; border: 1px solid var(--border-2); border-radius: 10px;
  padding: 10px 12px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: #E8CDB4; background: #FFF; }
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.range-val { font-size: 13px; font-weight: 600; color: var(--text-2); min-width: 44px; text-align: right; }
.checks { display: flex; flex-direction: column; gap: 8px; }
.checks label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.checks input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; }

/* Buttons */
.btn-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; font-family: var(--sans); cursor: pointer; text-decoration: none;
}
.btn-primary {
  background: var(--accent); color: #FFF; border-radius: 10px;
  padding: 11px 24px; font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 12px var(--accent-shadow);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }
.btn-secondary {
  background: #FFFFFF; border: 1px solid var(--border-2); color: var(--text-muted);
  border-radius: 10px; padding: 11px 20px; font-size: 14px; font-weight: 500;
}
.btn-secondary:hover { background: #F8F4EC; }

/* Result display bits */
.result-big { font-family: var(--serif); font-size: 34px; font-weight: 600; color: #8A4B2A; line-height: 1.2; }
.result-rows { display: flex; flex-direction: column; gap: 0; }
.result-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #EBDCC6; font-size: 14px; }
.result-row:last-child { border-bottom: none; }
.result-row .k { color: var(--text-muted); }
.result-row .v { font-weight: 600; color: var(--text); text-align: right; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat {
  background: rgba(255,255,255,0.65); border: 1px solid #F0E0CC; border-radius: 10px;
  padding: 12px; text-align: center;
}
.stat .num { font-family: var(--serif); font-size: 22px; font-weight: 600; color: #8A4B2A; }
.stat .lbl { font-size: 11.5px; color: #B98E63; margin-top: 3px; }

/* Dropzone */
.dropzone {
  flex: 1; border: 1.5px dashed #E4D9C6; border-radius: 10px;
  background: repeating-linear-gradient(45deg, #FCFAF6, #FCFAF6 10px, #F8F4EC 10px, #F8F4EC 20px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; color: var(--muted); text-align: center; padding: 20px; cursor: pointer;
  min-height: 140px;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); color: var(--text-muted); }
.file-list { display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 10px;
  background: #FCFAF6; border: 1px solid var(--border-2); border-radius: 10px;
  padding: 9px 12px; font-size: 13px;
}
.file-item .fname { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item .fsize { color: var(--muted); font-size: 12px; white-space: nowrap; }
.file-item button {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: 15px; padding: 2px 6px; border-radius: 6px;
}
.file-item button:hover { background: var(--chip); color: var(--text); }

/* ---------- Ad slots ---------- */
.ad-slot {
  margin: 26px 0; border: 1px dashed var(--border-2); border-radius: 12px;
  background: #FCFAF6; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #C9C2B2;
}

/* ---------- Related ---------- */
.related { margin-top: 44px; }
.related h2 { font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 0 0 14px 0; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.related-card {
  background: #FFFFFF; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; cursor: pointer; display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit; transition: box-shadow 0.15s, border-color 0.15s;
}
.related-card:hover { border-color: #E8CDB4; box-shadow: 0 4px 12px rgba(160,120,70,0.10); }
.related-chip {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.related-name { font-size: 13.5px; font-weight: 500; }

/* ---------- SEO content (how to / FAQ) ---------- */
.seo-content { margin-top: 44px; max-width: 640px; }
.seo-content h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 14px 0; }
.seo-content ol, .seo-content ul { padding-left: 20px; margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.7; }
.seo-content li { margin-bottom: 6px; }
.faq { margin-top: 36px; }
.faq details {
  background: #FFFFFF; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 18px; margin-bottom: 10px;
}
.faq summary { font-size: 14.5px; font-weight: 600; cursor: pointer; color: var(--text-2); }
.faq details p { font-size: 14px; color: var(--text-muted); line-height: 1.65; margin: 10px 0 2px 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 56px;
  padding: 28px 40px; font-size: 13px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Theme picker (sidebar bottom) ---------- */
.theme-picker {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-top: 1px solid var(--border);
}
.theme-picker .tp-label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-right: auto;
}
.theme-swatch {
  width: 20px; height: 20px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; padding: 0; position: relative;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.55);
}
.theme-swatch:hover { transform: scale(1.12); }
.theme-swatch.selected { border-color: var(--text); }
.theme-swatch.selected::after {
  content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #FFF; font-size: 10px; font-weight: 700;
}

/* ---------- Mobile ---------- */
.menu-btn {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 60;
  width: 40px; height: 40px; border-radius: 10px;
  background: #FFFFFF; border: 1px solid var(--border-2);
  box-shadow: 0 2px 8px rgba(120,100,70,0.12);
  align-items: center; justify-content: center; cursor: pointer;
}
.sidebar-overlay { display: none; }

@media (max-width: 860px) {
  .menu-btn { display: flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 70;
    transform: translateX(-100%); transition: transform 0.22s ease;
    box-shadow: 4px 0 24px rgba(60,45,25,0.15);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    display: none; position: fixed; inset: 0; z-index: 65;
    background: rgba(60,45,25,0.35);
  }
  .sidebar-overlay.show { display: block; }
  .hero { padding: 76px 22px 44px 22px; }
  .hero h1 { font-size: 32px; }
  .home-content { padding: 32px 18px 48px 18px; }
  .tool-page { padding: 72px 18px 48px 18px; }
  .workspace { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; }
  .site-footer { padding: 24px 18px; }
}
