:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #eef3f1;
  --text: #17201f;
  --muted: #61706c;
  --line: #d9e0dd;
  --accent: #16735b;
  --accent-dark: #0e5846;
  --warn: #a86218;
  --code: #111827;
  --shadow: 0 18px 50px rgba(24, 38, 36, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 0 14px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

button:hover {
  border-color: #b4c4be;
  background: #f9fbfa;
}

button:active {
  transform: translateY(1px);
}

.primary-action {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.primary-action:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(217, 224, 221, 0.85);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.top-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.top-nav a {
  border-radius: 8px;
  padding: 8px 10px;
}

.top-nav a:hover {
  background: #f2f6f4;
}

.top-nav a:hover,
.site-footer a:hover {
  color: var(--text);
}

.intro-band {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(238, 243, 241, 0.95), rgba(255, 255, 255, 0.98)),
    var(--surface);
}

.intro-grid {
  display: block;
  padding: 78px 0 62px;
}

.intro-copy {
  max-width: none;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: none;
  margin-bottom: 18px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.intro-copy p:last-child {
  max-width: 920px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.tool-grid,
.timestamp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.tool-grid {
  padding: 36px 0;
}

.timestamp-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.timestamp-layout {
  padding: 36px 0;
}

.tool-panel,
.info-panel,
.reference-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-panel {
  padding: 22px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.status-pill {
  min-width: 116px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: #f8faf9;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.status-pill.is-valid {
  border-color: rgba(22, 115, 91, 0.35);
  background: rgba(22, 115, 91, 0.1);
  color: var(--accent-dark);
}

.status-pill.is-error {
  border-color: rgba(168, 98, 24, 0.35);
  background: rgba(168, 98, 24, 0.1);
  color: var(--warn);
}

.field-label,
.input-group span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--text);
  outline: none;
}

textarea:focus,
input:focus {
  border-color: rgba(22, 115, 91, 0.72);
  box-shadow: 0 0 0 3px rgba(22, 115, 91, 0.12);
}

textarea {
  min-height: 440px;
  resize: vertical;
  padding: 16px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.55;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.metrics span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fbfcfc;
}

.side-column {
  display: grid;
  gap: 18px;
}

.info-panel {
  padding: 20px;
}

.info-panel p,
.info-panel li {
  color: var(--muted);
}

.info-panel ul {
  margin: 12px 0 0;
  padding-left: 20px;
}

.info-panel li + li {
  margin-top: 8px;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 96px;
  border: 1px dashed #aebcb7;
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      135deg,
      rgba(23, 32, 31, 0.025),
      rgba(23, 32, 31, 0.025) 8px,
      transparent 8px,
      transparent 16px
    ),
    #ffffff;
  color: var(--muted);
  text-align: center;
}

.ad-slot span {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.ad-slot code {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.ad-slot-side {
  min-height: 250px;
}

.ad-slot-wide {
  min-height: 110px;
}

.time-grid,
.result-grid,
.reference-grid {
  display: grid;
  gap: 14px;
}

.time-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

input {
  height: 46px;
  padding: 0 13px;
}

.result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.result-grid div {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfc;
}

.result-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.result-grid strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--code);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  font-weight: 700;
}

.reference-section {
  padding: 36px 0;
}

.reference-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.reference-item {
  padding: 18px;
}

pre {
  min-height: 72px;
  margin: 0;
  overflow: auto;
  border-radius: 8px;
  background: #101816;
  color: #e7f2ed;
  padding: 12px;
  font-size: 13px;
}

.ad-footer-wrap {
  padding-bottom: 36px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin-bottom: 0;
}

.legal-page {
  padding: 42px 0;
}

.legal-content {
  max-width: 820px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 28px;
  box-shadow: var(--shadow);
}

.legal-content p,
.legal-content li {
  color: var(--muted);
}

@media (max-width: 920px) {
  .tool-grid,
  .timestamp-layout,
  .time-grid,
  .result-grid,
  .reference-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 24px, 1160px);
  }

  .header-inner,
  .footer-inner,
  .top-nav,
  .site-footer nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-inner,
  .footer-inner {
    padding: 14px 0;
    gap: 14px;
  }

  .top-nav {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .site-footer nav {
    gap: 8px;
  }

  .intro-grid {
    padding: 46px 0 42px;
  }

  h1 {
    font-size: 34px;
  }

  .tool-panel {
    padding: 16px;
  }

  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar button {
    flex: 1 1 132px;
  }

  textarea {
    min-height: 360px;
  }
}
