.ow-page {
  --ow-ink: #172033;
  --ow-muted: #526276;
  --ow-accent: #087f6d;
  --ow-border: #d5e2eb;
  --ow-control: #76899c;
  --ow-soft: #f5f9fb;
  color: var(--ow-ink);
}
.ow-page [hidden] { display: none !important; }
#content.ow-page :is(a, summary, button, input, select, textarea):focus-visible,
#content.ow-page :is(#ow-error, #ow-result-title):focus {
  outline: 2px solid #176858 !important;
  outline-offset: 3px;
}
.ow-page h2, .ow-page h3 { color: var(--ow-ink); letter-spacing: 0; }
.ow-page h2 { margin: 0 0 7px; font-size: clamp(22px, 3vw, 29px); line-height: 1.3; }
.ow-page h3 { margin: 0 0 7px; font-size: 17px; line-height: 1.4; }
.ow-page :is(p, li, dd) { overflow-wrap: anywhere; }
.ow-page a { color: #00685a; }
.ow-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px 9px; margin-bottom: 16px; color: var(--ow-muted); font-size: 13px; }
.ow-intro { margin: 0 0 22px; }
.ow-intro .ow-eyebrow { margin: 0 0 8px; color: var(--ow-accent); font-size: 14px; font-weight: 850; }
.ow-page .ow-intro h1 { margin: 0 0 14px; color: #111827; font-size: clamp(30px, 4vw, 46px); line-height: 1.2; }
.ow-intro > p:last-child { margin: 0; color: var(--ow-muted); font-size: 16px; line-height: 1.7; }
.ow-card { margin-bottom: 18px; border: 1px solid var(--ow-border); border-radius: 9px; background: #fff; }
.ow-form, .ow-result, .ow-guide { min-width: 0; padding: 24px; }
.ow-form { border-radius: 9px; background: #fff; }
.ow-heading-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ow-heading-row > div { min-width: 0; }
.ow-heading-row p, .ow-note { margin: 0; color: var(--ow-muted); font-size: 13px; line-height: 1.6; }
.ow-text-link { display: inline-flex; min-height: 44px; align-items: center; flex-shrink: 0; font-size: 14px; font-weight: 750; }
.ow-mode-field, .ow-section, .ow-holiday { min-width: 0; padding: 0; border: 0; }
.ow-mode-field { margin: 17px 0 0; }
.ow-section { margin: 20px 0 0; }
.ow-section legend, .ow-mode-field legend, .ow-holiday legend { margin: 0 0 7px; padding: 0; color: var(--ow-ink); font-size: 16px; font-weight: 850; }
.ow-modes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; padding: 5px; border-radius: 8px; background: #e8eef4; }
.ow-modes label { position: relative; margin: 0; }
.ow-modes input {
  position: absolute !important; width: 1px !important; height: 1px !important; margin: 0 !important;
  padding: 0 !important; clip-path: inset(50%); opacity: 0 !important;
}
.ow-modes span {
  display: flex; min-height: 44px; height: 100%; padding: 6px; align-items: center; justify-content: center;
  border-radius: 6px; color: #45566c; font-size: 14px; font-weight: 800; line-height: 1.35;
  text-align: center; cursor: pointer; word-break: keep-all;
}
.ow-modes input:checked + span { color: var(--ow-accent); background: #fff; box-shadow: inset 0 0 0 2px var(--ow-accent); }
.ow-modes input:focus-visible + span { outline: 2px solid #176858; outline-offset: 1px; }
.ow-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ow-grid > * { min-width: 0; }
.ow-page .ow-field { display: grid; min-width: 0; align-content: start; gap: 5px; margin: 0; color: #34445a; font-size: 14px; font-weight: 750; }
.ow-field small { color: var(--ow-muted); font-size: 12px; font-weight: 500; }
.ow-page .ow-field :is(input, select, textarea) {
  box-sizing: border-box; width: 100%; min-width: 0; min-height: 46px; height: auto;
  margin: 0; padding: 8px 10px; border: 1px solid var(--ow-control) !important; border-radius: 7px;
  background-color: #fff !important; color: var(--ow-ink) !important; font-size: 16px !important; line-height: 1.4; box-shadow: none !important;
}
.ow-page .ow-field select { padding-right: 26px; }
.ow-field :is(input, textarea)::placeholder { color: #526276; opacity: 1; }
.ow-page .ow-field select:disabled { opacity: .65; }
.ow-page .ow-check {
  display: flex; min-height: 44px; width: fit-content; align-items: center; gap: 7px; margin: 5px 0;
  padding: 5px 3px; color: #34445a; font-size: 14px; line-height: 1.4; cursor: pointer;
}
.ow-check input {
  position: static !important; flex: none; width: 19px !important; height: 19px !important; margin: 0 !important;
  float: none; opacity: 1 !important; appearance: auto !important; accent-color: var(--ow-accent);
}
.ow-section > .ow-note, .ow-time-groups, .ow-actions + .ow-note { margin-top: 8px; }
.ow-wages, .ow-holidays { display: grid; gap: 7px; margin: 9px 0 12px; }
.ow-wage, .ow-holiday { min-width: 0; border: 1px solid var(--ow-border); border-radius: 7px; background: var(--ow-soft); }
.ow-wage summary, .ow-faq summary, .ow-output-list summary {
  box-sizing: border-box; min-height: 44px; padding: 9px 12px; color: #24374a;
  font-size: 15px; font-weight: 800; line-height: 1.55; cursor: pointer; overflow-wrap: anywhere;
}
.ow-wage summary small { display: inline-block; margin-left: 8px; color: var(--ow-muted); font-size: 13px; }
.ow-wage[data-state=include] summary small { color: #006851; }
.ow-wage[data-state=review] summary small { color: #734c12; }
.ow-row-body, .ow-holiday { padding: 13px; }
.ow-row-body .ow-note { margin-top: 8px; }
.ow-row-body .ow-button, .ow-holiday .ow-button { margin-top: 8px; }
.ow-holiday legend { padding-inline: 5px; }
#ow-holiday-group { margin-top: 14px; }
.modern-subpage .ow-page .ow-button {
  width: auto; min-width: 44px; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--ow-control); border-radius: 7px; background: #fff; color: #3e5167;
  box-shadow: none; font-size: 14px; font-weight: 800; line-height: 1.4; white-space: normal;
}
.modern-subpage .ow-page .ow-button:hover:not(:disabled) { background: #edf7f3; color: #096858; }
.modern-subpage .ow-page .ow-primary { width: 100%; color: #fff; border-color: var(--ow-accent); background: var(--ow-accent); }
.modern-subpage .ow-page .ow-primary:hover:not(:disabled) { color: #fff; background: #076b5c; }
.modern-subpage .ow-page .ow-button:disabled { opacity: .55; cursor: default; }
.ow-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 17px 0 8px; }
.ow-result .ow-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ow-error, .ow-notice {
  margin: 10px 0; padding: 10px 12px; border-left: 3px solid #9a701e; border-radius: 4px;
  background: #fff6e6; color: #604418; font-size: 14px; line-height: 1.6;
}
.ow-error { color: #942d2a; border-color: #a33530; background: #fff0ef; }
.ow-result { border-top: 1px solid var(--ow-border); }
.ow-result header p { margin: 0 0 10px; color: var(--ow-muted); font-size: 14px; }
.ow-result-hero {
  display: grid; min-width: 0; margin: 0 0 10px; padding: 14px; border-radius: 8px;
  background: #e8f6f1; color: #145447; line-height: 1.3;
}
.ow-result-hero span { font-size: 14px; font-weight: 800; }
.ow-result-hero strong { color: #075b4b; font-size: clamp(28px, 5vw, 41px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ow-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
.ow-summary div { min-width: 0; padding: 9px; border: 1px solid var(--ow-border); border-radius: 6px; background: var(--ow-soft); font-size: 14px; line-height: 1.5; }
.ow-summary dt { color: var(--ow-muted); }
.ow-summary dd { margin: 2px 0 0; color: var(--ow-ink); font-weight: 850; font-variant-numeric: tabular-nums; }
.ow-output-list { margin: 8px 0; border: 1px solid var(--ow-border); border-radius: 7px; background: #fff; }
.ow-output-list ul { margin: 0; padding: 0 12px 12px 30px; color: var(--ow-muted); font-size: 14px; line-height: 1.65; }
.ow-guide :is(p, li) { color: var(--ow-muted); font-size: 15px; line-height: 1.7; }
.ow-guide > section { margin-top: 18px; }
.ow-guide :is(section, .ow-notice) p { margin: 0 0 7px; }
.ow-guide .ow-notice p { margin: 0; color: inherit; }
.ow-guide .ow-note { font-size: 13px; }
.ow-guide ul { margin: 6px 0 8px; }
.ow-source-list { padding-inline-start: 22px; }
.ow-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ow-examples section { display: grid; align-content: start; min-width: 0; gap: 5px; padding: 12px; border: 1px solid var(--ow-border); border-radius: 7px; background: var(--ow-soft); }
.ow-examples p { margin: 0; font-size: 14px; }
.ow-examples .ow-button { justify-self: start; }
.ow-faq details { border-top: 1px solid var(--ow-border); }
.ow-faq details p { margin: 0; padding: 0 12px 12px; }
#ow-examples, #ow-result-title { scroll-margin-top: 14px; }

@media (max-width: 780px) {
  .ow-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ow-page :is(button, input, select, summary, textarea) { scroll-margin-block-end: 76px; }
}
@media (max-width: 540px) {
  .ow-form, .ow-result, .ow-guide { padding: 15px; }
  .ow-heading-row { display: block; }
  .ow-grid, .ow-examples { grid-template-columns: minmax(0, 1fr); }
  .ow-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ow-modes span { padding-inline: 3px; font-size: 13px; }
}
