:root {
  color-scheme: light;
  --ink: #1c2421;
  --muted: #617067;
  --line: #d9e1dc;
  --paper: #fbfcf9;
  --panel: #ffffff;
  --green: #0f6b55;
  --green-dark: #094637;
  --gold: #f4c95d;
  --red: #b42318;
  --shadow: 0 18px 45px rgba(20, 35, 30, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

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

.app-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 18px 10px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.brand img {
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.15;
}

.today-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 10px;
  min-width: min(100%, 440px);
}

.today-strip div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 10px 12px;
}

.today-strip span,
label span,
.result-row span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.today-strip strong {
  display: block;
  font-size: 1rem;
  line-height: 1.45;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 18px 48px;
}

.site-nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px 14px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.site-nav a {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  padding: 7px 11px;
  font-size: 0.93rem;
  font-weight: 700;
}

.site-nav a[aria-current="page"] {
  border-color: var(--green);
  background: #e7f3ee;
}

.tool-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tool-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: #eef4f0;
}

.tool-tabs button {
  min-height: 54px;
  border: 0;
  border-inline-start: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.tool-tabs button:first-child {
  border-inline-start: 0;
}

.tool-tabs button.is-active {
  background: var(--green);
  color: #fff;
}

.tool-panel {
  padding: 24px;
}

.panel-head {
  max-width: 720px;
}

.keyword-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border: 1px solid #c9ded5;
  border-radius: 8px;
  background: #eef8f4;
  color: var(--green-dark);
  padding: 3px 9px;
  font-size: 0.88rem;
  font-weight: 800;
}

.panel-head h2,
.method-note h2,
.seo-copy h2 {
  margin-bottom: 6px;
  font-size: 1.35rem;
  line-height: 1.25;
}

.panel-head p {
  color: var(--muted);
  margin-bottom: 18px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.segmented label {
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--ink);
  background: #fff;
  font-weight: 700;
}

.segmented input:checked + span {
  border-color: var(--green);
  background: #e7f3ee;
  color: var(--green-dark);
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(240px, 420px);
  gap: 14px;
  margin-bottom: 18px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

label {
  display: grid;
  gap: 6px;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 9px 11px;
}

input:focus,
select:focus,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(244, 201, 93, 0.65);
  outline-offset: 2px;
}

.primary-action {
  min-height: 48px;
  min-width: 160px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 800;
}

.primary-action:hover {
  background: var(--green-dark);
}

.result-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf7;
  padding: 14px;
}

.result-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(180px, 1.3fr);
  gap: 12px;
  align-items: baseline;
}

.result-row strong {
  font-size: 1.1rem;
}

.result-box.is-error {
  border-color: rgba(180, 35, 24, 0.35);
  background: #fff4f2;
  color: var(--red);
}

.method-note {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid #dfd2a9;
  border-radius: 8px;
  background: #fff9e8;
  padding: 16px;
}

.method-note p {
  margin-bottom: 0;
  color: #554719;
}

.method-note span {
  color: var(--green-dark);
  font-weight: 700;
  white-space: nowrap;
}

.content-sections {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.content-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.content-section h2 {
  margin-bottom: 8px;
  font-size: 1.12rem;
  line-height: 1.35;
}

.content-section p {
  margin-bottom: 10px;
  color: var(--muted);
}

.content-section p:last-child,
.content-list {
  margin-bottom: 0;
}

.content-list {
  display: grid;
  gap: 10px;
}

.content-list div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.content-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.content-list dt {
  color: var(--green-dark);
  font-weight: 800;
}

.content-list dd {
  margin: 2px 0 0;
  color: var(--muted);
}

.related-tools {
  margin-top: 22px;
}

.related-tools h2 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.related-tools div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.related-tools a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  padding: 7px 11px;
  font-weight: 700;
}

.seo-copy {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px 14px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

details p {
  margin: 10px 0 0;
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

@media (max-width: 780px) {
  .app-header,
  .method-note {
    grid-template-columns: 1fr;
  }

  .app-header {
    display: grid;
  }

  .today-strip,
  .tool-tabs,
  .content-sections,
  .form-grid.two,
  .form-grid.three,
  .result-row {
    grid-template-columns: 1fr;
  }

  .tool-tabs button {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }

  .tool-panel {
    padding: 18px;
  }

  .method-note span {
    white-space: normal;
  }
}
