/* Material-inspired design system shared by the tool directory and all tool pages. */
:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #5f6368;
  --line: #dadce0;
  --paper: #f8fafd;
  --green: #1a73e8;
  --green-dark: #185abc;
  --mint: #e8f0fe;
  --orange: #fbbc04;
  --surface: #fff;
  --surface-soft: #f1f3f4;
  --shadow-card: 0 1px 2px rgba(60,64,67,.12), 0 2px 6px rgba(60,64,67,.08);
  --radius-card: 20px;
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Google Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 3px solid #8ab4f8; outline-offset: 3px; }
::selection { color: var(--ink); background: #d2e3fc; }

/* Top bar with breadcrumb, shared by every tool page. */
.topbar { height: 64px; border-bottom: 1px solid #e8eaed; background: #fff; }
.topbar-inner { width: min(980px, 100% - 40px); height: 100%; margin: auto; display: flex; align-items: center; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin: 0; padding: 0; list-style: none; font-size: .94rem; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; color: #3c4043; }
.breadcrumb li + li::before { content: "›"; color: #9aa0a6; }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; margin: 0 -8px; border-radius: 8px; color: var(--green); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { font-weight: 600; }
@media (max-width: 650px) {
  .topbar { height: 58px; }
  .topbar-inner { width: calc(100% - 28px); }
}

/* Guide sections below each tool: usage examples, FAQ, related tools. */
.guide { margin-top: 40px; }
.guide h2 { margin: 0 0 14px; color: #202124; font-size: 1.3rem; font-weight: 500; letter-spacing: -.02em; }
.guide h3 { margin: 0 0 10px; color: #3c4043; font-size: 1rem; font-weight: 600; }
.guide-example { margin-top: 12px; padding: 18px 20px; border: 1px solid #e1e3e6; border-radius: 16px; background: var(--surface); }
.guide-example dl { display: grid; grid-template-columns: 4em 1fr; gap: 8px 12px; margin: 0; font-size: .92rem; }
.guide-example dt { color: var(--muted); font-weight: 600; }
.guide-example dd { margin: 0; min-width: 0; }
.guide-example pre { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--surface-soft); font: .9rem/1.6 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.faq-item { border-bottom: 1px solid #e8eaed; }
.faq-item summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 0; color: #202124; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--green-dark); font-weight: 700; line-height: 1; }
.faq-item[open] summary::before { content: "−"; }
.faq-item p { margin: 0 0 14px; color: #3c4043; }
.related-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.related-tools a { display: flex; flex-direction: column; gap: 3px; height: 100%; min-height: 40px; padding: 12px 16px; border: 1px solid #e1e3e6; border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; box-sizing: border-box; }
.related-tools a:hover { border-color: #c6dafc; background: #f8fbff; }
.related-tools strong { color: var(--green-dark); font-weight: 600; }
.related-tools a:hover strong { text-decoration: underline; }
.related-tools span { color: var(--muted); font-size: .875rem; line-height: 1.6; }
.related-all { margin: 14px 0 0; }
.related-all a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; color: var(--green-dark); font-weight: 600; text-decoration: none; }
.related-all a::after { content: "›"; font-size: 1.2rem; line-height: 1; }
.related-all a:hover { text-decoration: underline; }
@media (max-width: 650px) {
  .guide-example { padding: 16px; }
  .related-tools { grid-template-columns: 1fr; }
  .guide-example dl { grid-template-columns: 1fr; gap: 2px; }
  .guide-example dt { margin-top: 6px; }
}
