/* Shared by the kufuapp.com tool pages. Tokens match docs/index.html. */
:root {
  --paper: #F6F0E4;
  --paper-2: #EFE6D4;
  --card: #FBF7EF;
  --ink: #141210;
  --ink-2: #4A433B;
  --ink-3: #7C7368;
  --red: #8D0005;
  --line: rgba(20, 18, 16, 0.12);
  --night: #0E0D0C;
  --night-2: #1A1816;
  --night-line: rgba(246, 240, 228, 0.12);
  --cream: #F0E6D3;
  --green: #34C759;
  --purple: #A86BFF;
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
body { font-family: var(--body); background: var(--paper); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.kanji { font-family: 'Noto Serif JP', serif; font-weight: 700; }

.display { font-family: var(--display); font-stretch: 78%; font-weight: 850; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.92; }
.display em { font-style: normal; color: var(--red); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }
.lede { font-size: 18px; color: var(--ink-2); max-width: 620px; }

/* Nav */
.top { position: sticky; top: 0; z-index: 50; background: rgba(246, 240, 228, 0.88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand b { font-family: var(--display); font-stretch: 90%; font-weight: 850; font-size: 22px; }
.brand .kanji { color: var(--red); font-size: 15px; }
.top-links { display: flex; gap: 24px; align-items: center; }
.top-links a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.top-links a:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: var(--paper) !important; font-weight: 600; font-size: 14px; text-decoration: none; padding: 10px 16px; border-radius: 999px; transition: background .15s; border: 0; cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--red); }
@media (max-width: 680px) { .top-links a.hide-sm { display: none; } }

/* Page head */
.head { padding: 56px 0 36px; }
.head h1 { font-size: clamp(44px, 7vw, 84px); margin-bottom: 18px; }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* Tool layout */
.tool { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; margin-bottom: 72px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 26px; }
.panel.dark { background: var(--night); color: var(--cream); border-color: transparent; }
@media (max-width: 860px) { .tool { grid-template-columns: 1fr; } }

/* Form */
.field { margin-bottom: 18px; }
.field > label, .field > .label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--ink-2); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type=number], select {
  width: 100%; font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); appearance: none; -webkit-appearance: none;
}
input[type=number]:focus, select:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
.suffix { position: relative; }
.suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 14px; pointer-events: none; }
.suffix input { padding-right: 48px; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.seg { display: flex; background: var(--paper-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg label { flex: 1; text-align: center; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 9px 6px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink-2); transition: background .15s; }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg input:focus-visible + span { outline: 2px solid var(--red); }
.hint { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }

/* Results */
.big { font-family: var(--display); font-stretch: 80%; font-weight: 850; font-size: 64px; line-height: 1; }
.big small { font-family: var(--body); font-size: 16px; font-weight: 500; color: rgba(240,230,211,.6); margin-left: 6px; }
.res-label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(240,230,211,.55); margin-bottom: 6px; }
.res-block + .res-block { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--night-line); }
.res-why { font-size: 14px; color: rgba(240,230,211,.72); margin-top: 6px; }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mid { font-family: var(--display); font-stretch: 80%; font-weight: 850; font-size: 38px; line-height: 1; }
.mid small { font-family: var(--body); font-size: 14px; font-weight: 500; color: rgba(240,230,211,.6); margin-left: 4px; }
.warn { background: rgba(226,68,75,.12); border: 1px solid rgba(226,68,75,.4); color: #F2B8BB; border-radius: 12px; padding: 12px 14px; font-size: 14px; }
table.loads { width: 100%; border-collapse: collapse; font-size: 15px; }
table.loads th { text-align: left; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(240,230,211,.5); font-weight: 600; padding: 0 0 8px; }
table.loads td { padding: 8px 0; border-top: 1px solid var(--night-line); }
table.loads td:last-child, table.loads th:last-child { text-align: right; }
table.loads tr.hit td { color: var(--green); font-weight: 600; }

/* App plug */
.plug { display: flex; gap: 16px; align-items: center; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--night-line); }
.plug img.icon { width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; }
.plug p { font-size: 14px; color: rgba(240,230,211,.8); }
.plug a.badge img { height: 40px; width: auto; }

/* Article */
.article { max-width: 720px; padding-bottom: 80px; }
.article h2 { font-family: var(--display); font-stretch: 80%; font-weight: 850; text-transform: uppercase; font-size: 34px; line-height: 1; margin: 44px 0 14px; }
.article h3 { font-size: 18px; margin: 24px 0 8px; }
.article p, .article li { color: var(--ink-2); font-size: 16.5px; }
.article p + p { margin-top: 12px; }
.article ul, .article ol { padding-left: 22px; margin-top: 10px; display: grid; gap: 6px; }
.article code { font-size: 14px; background: var(--paper-2); padding: 2px 6px; border-radius: 6px; }
.formula { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 15px; margin: 12px 0; color: var(--ink); }
.article table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.article th, .article td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.article th { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

/* More tools */
.more { border-top: 1px solid var(--line); padding: 56px 0 80px; }
.more h2 { font-size: clamp(34px, 4.6vw, 52px); margin-bottom: 24px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--red); }
.card small { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--red); font-weight: 700; }
.card b { display: block; font-size: 19px; margin: 8px 0 6px; }
.card span { font-size: 14.5px; color: var(--ink-2); }
.card.here { pointer-events: none; opacity: .5; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

/* Footer */
.foot { background: var(--night); color: rgba(240,230,211,.55); padding: 34px 0 44px; font-size: 14px; }
.foot .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--cream); }
.foot .tps { display: inline-flex; align-items: center; gap: 7px; color: var(--cream); }
.foot .wrap > span:first-child { margin-right: auto; }
.foot .wrap { column-gap: 34px; }

@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .panel { padding: 20px; }
  .big { font-size: 54px; }
}
