/* DACHI spoke bender technical guide / understated product-document styling */
:root {
  --ink: #252e33;
  --text: #485057;
  --sub: #727b80;
  --accent: #b34538;
  --accent-dark: #8e382f;
  --rule: #dfe2e3;
  --panel: #f4f5f5;
  --panel-deep: #eceff0;
  --white: #fff;
  --max-width: 1100px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 14px/1.85 "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
.container { width: min(calc(100% - 56px), var(--max-width)); margin: 0 auto; }
.skip-link { position: absolute; left: 8px; top: -70px; z-index: 30; background: var(--ink); color: white; padding: 9px 14px; }
.skip-link:focus { top: 8px; }
.page-main { padding: 0px 0 95px 0; }

/* Title: one quiet information panel, not a brand hero or site header. */
.page-intro {
  position: relative;
  margin: 0 0 25px;
  padding: 29px 35px 27px;
  background: linear-gradient(120deg, #f2f3f3 0%, #f7f7f7 72%, #fbfbfb 100%);
  border: 1px solid #e1e3e3;
  border-top: 3px solid #495359;
}
.page-intro::after { content: ""; position: absolute; left: 35px; bottom: -1px; width: 95px; height: 3px; background: var(--accent); }
.page-intro__top { display: flex; align-items: start; justify-content: space-between; gap: 22px; }
.page-label { margin: 0 0 5px; font-size: 12px; font-weight: 750; color: #58636a; }
.page-intro h1 { margin: 0 0 11px; font-size: clamp(25px,3vw,32px); line-height: 1.4; letter-spacing: -.04em; }
.page-lead { max-width: 60em; margin: 0 0 18px; color: var(--text); font-size: 14px; }
.guide-stamp { flex: 0 0 auto; margin-top: 5px; border: 1px solid #cfd4d5; padding: 5px 13px; font-size: 12px; font-weight: 650; color: #667077; background: rgba(255,255,255,.65); }
.product-link { display: inline-flex; align-items: center; gap: 11px; padding: 6px 0; color: #3c484e; font-size: 12px; font-weight: 700; text-underline-offset: 4px; text-decoration-color: #9da6aa; }
.product-link:hover { color: var(--accent-dark); text-decoration-color: var(--accent); }
.product-link::after { content: "↗"; color: var(--accent); font-size: 14px; }

.guide-content { padding-top: 0; }
.guide-section { padding: 29px 0 47px; border-bottom: 1px solid var(--rule); scroll-margin-top: 18px; }
.guide-section:last-child { border-bottom: 0; padding-bottom: 0; }
/* Chapter heading: compact horizontal strip, avoids DFG's large red numbers and English labels */
.section-heading {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 9px 18px 9px 17px;
  margin: 0 0 24px;
  background: #f2f3f3;
  border-left: 4px solid #a7afb2;
  border-bottom: 1px solid #d8dddf;
  font-size: clamp(18px,2.25vw,23px);
  line-height: 1.45;
  font-weight: 750;
  letter-spacing: -.018em;
}
.content-card { background: #fff; }
.split { display: grid; grid-template-columns: minmax(0,1.02fr) minmax(0,.98fr); align-items: start; gap: 31px; }
.photo { margin: 0; overflow: hidden; border: 1px solid #dadfe1; background: #fbfbfb; padding: 7px; box-shadow: 0 3px 13px rgba(32,47,53,.045); }
.photo img { width: 100%; height: auto; object-fit: contain; }
.body-copy { padding-top: 2px; }
.body-copy p { margin: 0 0 15px; color: var(--text); }
.body-copy p:last-child { margin-bottom: 0; }

.process-list { margin: 3px 0 0; padding: 0; list-style: none; counter-reset: item; }
.process-list li { counter-increment: item; position: relative; padding: 0 0 15px 35px; }
.process-list li:not(:last-child) { margin-bottom: 16px; border-bottom: 1px dashed #d8ddde; }
.process-list li::before { content: counter(item); position: absolute; top: 0; left: 0; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #69767c; font: 750 11px/1 Arial,sans-serif; }
.process-list strong { display: block; margin-bottom: 5px; font-size: 14px; }
.process-list p { margin: 0; color: var(--text); font-size: 13px; }
.split--intro { margin-bottom: 27px; }
.resource-box { margin-top: 17px; padding: 13px 16px 14px; background: var(--panel); border: 1px solid #e0e4e5; border-left: 3px solid #89949a; }
.resource-box strong { font-size: 13px; }
.resource-box p { margin: 5px 0 9px; font-size: 12px; }
.resource-link { font-weight: 700; font-size: 12px; color: #334c5a; text-underline-offset: 3px; }

.method-card { margin-bottom: 18px; padding: 22px 25px 25px; background: #fbfbfb; border: 1px solid #e0e3e4; }
.method-card--second { margin-bottom: 0; }
.method-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 19px; padding-bottom: 13px; border-bottom: 1px solid #dfe3e4; font-size: 17px; line-height: 1.55; font-weight: 750; }
.method-heading::before { content: ""; width: 4px; height: 19px; flex: 0 0 4px; background: var(--accent); }
.split--method { grid-template-columns: minmax(0,1.07fr) minmax(0,1fr); gap: 26px; }
.definition-list { margin: 14px 0 17px; }
.definition-list div { display: grid; grid-template-columns: 30px 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid #e3e6e6; }
.definition-list div:last-child { border-bottom: 1px solid #e3e6e6; }
.definition-list dt { color: var(--accent-dark); font-weight: 800; font-size: 13px; }
.definition-list dd { margin: 0; font-size: 12px; color: var(--text); }
.inline-note { padding: 6px 0 6px 11px; border-left: 2px solid #a5b0b3; color: #5c676d; font-size: 12px; }
.emphasis { font-weight: 750; color: var(--ink); }
.related-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.related-links a { display: inline-block; background: #f6f7f7; border: 1px solid #dce0e2; padding: 9px 14px; font-size: 12px; font-weight: 700; color: #354b55; text-decoration: none; }
.related-links a:hover { background: #edf1f2; border-color: #b9c3c8; }

/* Calculator gets just enough contrast to be easy to find. */
.calculator { margin-top: 28px; background: #f0f2f2; border: 1px solid #d3d9db; padding: 28px 32px 25px; scroll-margin-top: 14px; }
.calculator__head { margin: 0 0 23px; padding: 0 0 15px; border-bottom: 1px solid #d7dddf; }
.calculator__head h3 { margin: 0 0 4px; font-size: 21px; font-weight: 750; }
.calculator__head > p:last-child { margin: 0; font-size: 13px; color: #5b676d; }
.field-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.form-field label { display: flex; align-items: center; gap: 8px; margin: 0 0 7px; font-size: 13px; font-weight: 700; }
.field-code { background: #fff; color: #56656b; border: 1px solid #ccd3d6; display: grid; place-items: center; width: 24px; height: 24px; font: 750 12px/1 Arial, sans-serif; }
.input-unit { position: relative; }
.input-unit input { width: 100%; height: 50px; padding: 0 42px 0 13px; background: #fff; border: 1px solid #bec7ca; border-radius: 2px; color: var(--ink); font-weight: 700; font-size: 17px; }
.input-unit input:focus { outline: 2px solid rgba(57,87,100,.18); border-color: #516c79; }
.input-unit input::placeholder { font-size: 12px; font-weight: 400; color: #9aa3a8; }
.input-unit span { position: absolute; top: 50%; right: 13px; transform: translateY(-50%); pointer-events: none; font-size: 12px; color: #718088; }
.diameter-field { min-width: 0; margin: 19px 0 24px; padding: 0; border: 0; }
.diameter-field legend { margin: 0 0 9px; padding: 0; font-size: 13px; font-weight: 700; }
.diameter-field__hint { color: #737d82; margin-left: 8px; font-size: 11px; font-weight: 400; }
.diameter-options { display: flex; flex-wrap: wrap; gap: 10px; }
.diameter-option { position: relative; cursor: pointer; }
.diameter-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.diameter-option span { display: block; min-width: 85px; text-align: center; padding: 8px 11px; background: #fff; border: 1px solid #bfc8cc; color: #505a60; font: 700 14px/1.5 Arial, sans-serif; transition: border-color .15s, background .15s; }
.diameter-option:hover span { border-color: #6c7b82; }
.diameter-option input:checked + span { color: #fff; border-color: #3b4b52; background: #3b4b52; }
.diameter-option input:focus-visible + span { outline: 2px solid #548da9; outline-offset: 2px; }
.form-errors { margin: 0 0 16px; padding: 11px 14px; background: #fff; border-left: 3px solid var(--accent); color: #963f35; font-size: 13px; }
.form-errors ul { margin: 4px 0 0; padding-left: 19px; }
.calculator__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.calculate-button { display: inline-flex; justify-content: center; align-items: center; gap: 16px; min-width: 175px; padding: 12px 20px; color: #fff; background: #354249; border: 1px solid #354249; border-radius: 2px; font-size: 13px; font-weight: 750; cursor: pointer; }
.calculate-button:hover { background: #202b30; }
.calculate-button span { font-size: 17px; line-height: 1; }
.reset-link { font-size: 12px; color: #55636a; text-underline-offset: 3px; }
.calculation-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 17px 19px; background: #fff; border: 1px solid #d2dadd; border-left: 4px solid var(--accent); }
.calculation-result__label { display: block; margin-bottom: 3px; color: #6d787d; font-size: 12px; font-weight: 750; }
.calculation-result strong { display: block; font: 750 clamp(28px,4vw,37px)/1.3 Arial,sans-serif; font-variant-numeric: tabular-nums; }
.calculation-result small { font-size: 14px; }
.calculation-result__check { font-size: 19px; color: #52745c; }
.calculator__note { margin: 14px 0 0; font-size: 12px; color: #68747a; }

.bending-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.bending-item { min-width: 0; padding: 13px; border: 1px solid #e1e4e5; background: #fbfbfb; }
.bending-item .photo { border-color: #e3e6e6; padding: 0; box-shadow: none; }
.bending-item__body { padding: 14px 4px 5px; }
.bending-item__body h3 { margin: 0 0 6px; font-size: 16px; font-weight: 750; }
.bending-item__body p { margin: 0; color: var(--text); font-size: 13px; }
@media (max-width: 850px) {
  .split, .split--method { grid-template-columns: 1fr; gap: 22px; }
  .method-card { padding: 20px; }
}
@media (max-width: 620px) {
  .container { width: min(calc(100% - 32px), var(--max-width)); }
  .page-main { padding: 20px 0 60px; }
  .page-intro { padding: 23px 20px; }
  .page-intro::after { left: 20px; }
  .page-intro__top { display: block; }
  .guide-stamp { display: none; }
  .page-intro h1 { font-size: 25px; }
  .guide-section { padding: 22px 0 36px; }
  .section-heading { font-size: 19px; margin-bottom: 19px; padding-inline: 12px; }
  .method-card { padding: 17px 15px; }
  .method-heading { font-size: 16px; }
  .calculator { padding: 19px 17px; }
  .field-grid, .bending-grid { grid-template-columns: 1fr; gap: 16px; }
  .bending-item { padding: 10px; }
  .diameter-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .diameter-option span { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
