/* Google Fonts - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --ink: #132033;
  --muted: #627082;
  --line: #d9e0e6;
  --blue: #1f6fb2;
  --green: #1f9d70;
  --green-hover: #17866d;
  --amber: #c78220;
  --red: #b84a42;
  --shadow: 0 18px 45px rgba(19, 32, 51, 0.08);
  --radius: 8px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* -- Dark Mode ------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1520;
    --surface: #1a2332;
    --surface-2: #1e2b3a;
    --ink: #e8edf2;
    --muted: #96a3b6;
    --line: #2a3a4e;
    --blue: #4da3e8;
    --green: #2ec48a;
    --green-hover: #25b07a;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
  }

  .site-header {
    background: rgba(26, 35, 50, 0.92);
  }

  .hero {
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  }

  .tabs {
    background: var(--surface-2);
  }

  input, select {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
  }

  input:focus, select:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(77, 163, 232, 0.18);
  }

  label {
    color: var(--muted);
  }

  .btn.secondary {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
  }

  .hint {
    background: #2a2214;
    border-left-color: var(--amber);
    color: #e8c77a;
  }

  .icon-button {
    background: var(--surface);
    border-color: var(--line);
  }

  .content p, .content li {
    color: var(--muted);
  }

  .download-box {
    background: var(--surface-2);
  }

  .related a {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--ink);
  }

  .related a:hover {
    background: var(--surface);
  }

  .breadcrumb a {
    color: var(--muted);
  }
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--bg);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
}

/* -- Header & Navigation --------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav {
  align-items: center;
  display: flex;
  gap: 22px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1160px;
  min-height: 64px;
  padding: 0 20px;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0;
  transition: opacity 0.2s var(--ease);
}

.brand:hover {
  opacity: 0.8;
  text-decoration: none;
}

.brand img {
  height: 34px;
  width: 34px;
}

.nav-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
  position: relative;
  transition: color 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
  text-decoration: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: width 0.25s var(--ease);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

/* -- Breadcrumb ------------------------------------ */
.breadcrumb {
  margin: 0 auto;
  max-width: 1160px;
  padding: 10px 20px 0;
  font-size: 0.85rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--blue);
}

.breadcrumb span {
  color: var(--muted);
  margin: 0 6px;
}

.breadcrumb .current {
  color: var(--ink);
  font-weight: 600;
}

/* -- Hero ------------------------------------------- */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f5f7f8 100%);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) 330px;
  margin: 0 auto;
  max-width: 1160px;
  padding: 44px 20px 28px;
}

.eyebrow {
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  max-width: 820px;
}

.hero-copy {
  color: var(--muted);
  font-size: 1.08rem;
  margin: 16px 0 0;
  max-width: 760px;
}

.quick-stats {
  align-self: end;
  border-left: 4px solid var(--green);
  display: grid;
  gap: 12px;
  padding: 4px 0 4px 20px;
}

.quick-stats div {
  display: grid;
  gap: 2px;
}

.quick-stats strong {
  font-size: 1.35rem;
}

.quick-stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* -- Tool Band -------------------------------------- */
.tool-band {
  background: var(--bg);
  padding: 26px 20px 34px;
}

.tool-app {
  margin: 0 auto;
  max-width: 1160px;
}

.tool-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tabs {
  background: #f9fbfb;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0;
  overflow-x: auto;
}

.tab-button {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-weight: 760;
  min-height: 54px;
  padding: 0 18px;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.tab-button:hover {
  background: rgba(31, 157, 112, 0.06);
  color: var(--ink);
}

.tab-button[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--green);
}

.tool-panels {
  padding: 24px;
}

.panel {
  display: none;
  animation: fadeIn 0.3s var(--ease);
}

.panel.is-active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tool-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.05fr) minmax(290px, 0.95fr);
}

/* -- Forms ------------------------------------------ */
.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: #304156;
  font-size: 0.9rem;
  font-weight: 760;
}

input,
select {
  background: #fff;
  border: 1px solid #cbd5de;
  border-radius: 6px;
  color: var(--ink);
  min-height: 44px;
  padding: 9px 11px;
  width: 100%;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

input:focus,
select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(31, 111, 178, 0.14);
}

input.is-invalid {
  border-color: var(--red);
  outline: 3px solid rgba(184, 74, 66, 0.12);
}

.field-error {
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 600;
}

.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* -- Buttons ---------------------------------------- */
.btn {
  align-items: center;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 780;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  transition: transform 0.15s var(--ease), opacity 0.15s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(19, 32, 51, 0.15);
}

.btn:active {
  transform: translateY(0);
  opacity: 1;
}

.btn.secondary {
  background: #fff;
  border-color: #cbd5de;
  color: var(--ink);
}

.btn.secondary:hover {
  background: var(--surface-2);
  border-color: var(--line);
}

.btn.green {
  background: var(--green);
  border-color: var(--green);
}

.btn.green:hover {
  background: var(--green-hover);
  border-color: var(--green-hover);
}

/* -- Result Box ------------------------------------- */
.result-box {
  background: linear-gradient(135deg, #10233f 0%, #162d4f 100%);
  border-radius: var(--radius);
  color: #fff;
  min-height: 100%;
  padding: 22px;
}

.result-label {
  color: #b7c7d8;
  font-weight: 760;
  margin: 0 0 6px;
}

.result-main {
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 860;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
  overflow-wrap: anywhere;
  transition: opacity 0.25s var(--ease);
}

.result-sub {
  color: #d7e3ed;
  margin: 12px 0 0;
}

.result-list {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  gap: 9px;
  margin-top: 18px;
  padding-top: 18px;
}

.result-list div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.result-list span {
  color: #b7c7d8;
}

.hint {
  background: #fff8eb;
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #51370f;
  margin-top: 16px;
  padding: 12px 14px;
}

/* -- Duration Rows ---------------------------------- */
.rows {
  display: grid;
  gap: 10px;
}

.row-line {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
}

.icon-button {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5de;
  border-radius: 6px;
  color: var(--red);
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}

.icon-button:hover {
  background: #fef2f1;
  border-color: var(--red);
}

/* -- Week Grid -------------------------------------- */
.week-grid {
  display: grid;
  gap: 10px;
}

.week-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr 1fr;
}

/* -- Content Band ----------------------------------- */
.content-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 42px 20px 60px;
}

.content {
  display: grid;
  gap: 30px;
  margin: 0 auto;
  max-width: 980px;
}

.content h2 {
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.content p,
.content li {
  color: #405066;
}

.content p {
  margin: 0 0 12px;
}

.split {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* -- Feature & FAQ Lists ---------------------------- */
.feature-list,
.faq-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li,
.faq-list li {
  border-left: 3px solid var(--green);
  padding-left: 14px;
}

/* -- Related Links ---------------------------------- */
.related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.related a {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-weight: 720;
  padding: 9px 12px;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
}

.related a:hover {
  background: var(--surface);
  border-color: var(--green);
  text-decoration: none;
  transform: translateY(-1px);
}

/* -- Download Box ----------------------------------- */
.download-box {
  align-items: center;
  background: #eef3f1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 20px;
}

.download-box h2,
.download-box p {
  margin-left: 0;
  margin-right: 0;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.download-actions a {
  text-decoration: none;
}

.template-preview {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: block;
  height: auto;
  max-width: 100%;
}

/* -- Conversion Table ------------------------------- */
.data-table {
  border-collapse: collapse;
  font-size: 0.95rem;
  width: 100%;
}

.data-table th,
.data-table td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
}

.data-table th {
  background: var(--surface-2);
  font-weight: 700;
}

.data-table tr:hover {
  background: rgba(31, 157, 112, 0.04);
}

/* -- Footer ----------------------------------------- */
.site-footer {
  background: #10233f;
  color: #d7e3ed;
  padding: 28px 20px;
}

.consent-banner {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  bottom: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  left: 16px;
  max-width: 920px;
  padding: 16px;
  position: fixed;
  right: 16px;
  z-index: 20;
}

.consent-banner p {
  color: var(--ink);
  margin: 0;
}

.consent-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-inner {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1160px;
}

.footer-inner a {
  color: #fff;
  transition: opacity 0.2s var(--ease);
}

.footer-inner a:hover {
  opacity: 0.8;
}

.mini-note {
  color: var(--muted);
  font-size: 0.9rem;
}

/* -- Toast / Copy Feedback -------------------------- */
.btn[data-copy], .btn[data-share] {
  transition: transform 0.15s var(--ease), opacity 0.15s var(--ease), background 0.3s var(--ease);
}

/* -- Responsive: Tablet ----------------------------- */
@media (max-width: 860px) {
  .hero-inner,
  .tool-grid,
  .split,
  .download-box,
  .consent-banner {
    grid-template-columns: 1fr;
  }

  .quick-stats {
    align-self: start;
  }

  .form-grid,
  .week-row {
    grid-template-columns: 1fr;
  }

  .nav {
    flex-wrap: wrap;
    padding-bottom: 14px;
    padding-top: 14px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 8px;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a::after {
    display: none;
  }

  .tool-panels {
    padding: 18px;
  }
}

/* -- Responsive: Phone ------------------------------ */
@media (max-width: 520px) {
  .hero-inner {
    padding-top: 30px;
  }

  .tab-button {
    padding: 0 14px;
  }

  .result-box {
    padding: 18px;
  }

  .actions .btn {
    width: 100%;
  }

  .breadcrumb {
    font-size: 0.8rem;
  }
}
