:root {
  --paper:#faf8f0;
  --white:#fffdf8;
  --ink:#263a30;
  --muted:#4f6054;
  --line:#cbd4c7;
  --green:#294e3b;
  --lime:#d8edaa;
  --peach:#f8e6db;
  color:var(--ink);
  background:var(--paper);
  font:16px/1.65 "Segoe UI","Yu Gothic UI",Meiryo,sans-serif
}
* {
  box-sizing:border-box
}
body,h1,h2,h3,p {
  margin:0
}
a {
  color:var(--green);
  text-underline-offset:3px
}
button,input,select,textarea {
  font:inherit;
  color:inherit
}
button,.file-button {
  border:1px solid var(--green);
  background:var(--white);
  border-radius:8px;
  padding:9px 14px;
  cursor:pointer;
  min-height:44px
}
button:disabled {
  opacity:.5;
  cursor:not-allowed
}
button.primary {
  background:var(--green);
  color:white
}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #729349;
  outline-offset:3px
}
.wrap {
  width:min(1320px,calc(100% - 48px));
  margin:auto
}
.site-head {
  border-bottom:1px solid var(--line)
}
.nav,nav {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px 24px;
  flex-wrap:wrap
}
.nav {
  padding:17px 0
}
nav a {
  padding:5px 0
}
.hero {
  padding:44px 0 24px
}
.eyebrow {
  font-size:12px;
  letter-spacing:.14em;
  font-weight:750;
  color:var(--green)
}
h1 {
  font-size:clamp(28px,5vw,46px);
  line-height:1.3;
  margin:7px 0 14px
}
.hero p:last-child {
  max-width:70ch;
  color:var(--muted)
}
h2 {
  font-size:21px;
  margin-bottom:14px
}
h3 {
  font-size:17px;
  margin-bottom:8px
}
.toolbar,.saved,.row-actions,.export-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px
}
.file-button input {
  display:block;
  max-width:220px;
  font-size:12px
}
.saved {
  align-items:center;
  margin-top:14px
}
.saved select {
  max-width:420px;
  flex:1;
  min-width:180px
}
#notice {
  padding-block:14px;
  overflow-wrap:anywhere
}
.workspace {
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:24px;
  align-items:start;
  padding-bottom:60px
}
.summary-panel {
  position:sticky;
  top:14px;
  border:1px solid #a9bd93;
  border-radius:16px;
  background:#f0f6e6;
  padding:22px
}
.summary-panel .hint {
  margin-top:14px
}
.export-actions {
  flex-direction:column;
  margin-top:18px
}
.export-actions button {
  width:100%
}
.outputs-row {
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--line)
}
.outputs-row a {
  display:inline-block;
  margin-right:12px
}
fieldset,details.section {
  margin:0 0 18px;
  padding:21px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--white);
  min-width:0
}
legend,summary {
  font-size:19px;
  font-weight:750
}
summary {
  cursor:pointer
}
details.section[open]>summary {
  margin-bottom:18px
}
.grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px
}
.field {
  display:block;
  min-width:0
}
.field>span {
  display:block;
  font-weight:650;
  font-size:14px;
  margin-bottom:4px
}
.field input,.field select,.field textarea,select {
  display:block;
  width:100%;
  border:1px solid #aab8a4;
  border-radius:6px;
  background:white;
  padding:9px 10px;
  min-height:44px
}
textarea {
  resize:vertical;
  min-height:76px
}
.pair {
  margin-bottom:16px
}
.pair>p {
  font-weight:700;
  margin-bottom:5px
}
.pair label>span {
  font-size:12px;
  color:var(--muted)
}
.hint {
  font-size:14px;
  color:var(--muted);
  margin:8px 0 14px
}
.check {
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin:12px 0
}
.check input {
  width:19px;
  height:19px;
  flex:none;
  margin-top:4px
}
.check strong {
  font-weight:700
}
.subcard {
  padding:16px;
  border:1px solid var(--line);
  border-radius:10px;
  margin-top:14px;
  background:#fafaf5
}
.subcard h3 {
  font-size:16px
}
.duration-row {
  display:flex;
  align-items:flex-end;
  gap:8px;
  flex-wrap:wrap;
  margin:8px 0
}
.duration-row .field {
  width:110px
}
.duration-row button {
  font-size:13px;
  padding:7px 10px
}
.row-actions {
  margin-top:12px
}
.small-button {
  font-size:13px;
  padding:6px 10px
}
.warn {
  padding:12px;
  border-radius:8px;
  background:var(--peach);
  font-size:14px;
  margin:12px 0
}
.state {
  font-weight:800;
  font-size:16px
}
.sum-total {
  font-size:28px;
  font-weight:750;
  margin:12px 0
}
.sum-lines {
  padding:0;
  list-style:none;
  font-size:14px
}
.sum-lines li {
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:8px 0;
  border-bottom:1px solid var(--line)
}
.sum-lines strong {
  white-space:nowrap
}
.validation {
  font-size:13px;
  padding-left:18px;
  margin-top:12px;
  max-height:300px;
  overflow:auto
}
.validation li+li {
  margin-top:5px
}
#outputs {
  overflow-wrap:anywhere
}
.rates {
  max-width:1120px;
  padding-bottom:60px
}
.rates section {
  margin-top:32px
}
.table-wrap {
  overflow:auto;
  border:1px solid var(--line);
  border-radius:12px;
  margin-top:16px
}
table {
  border-collapse:collapse;
  width:100%;
  font-size:15px
}
th,td {
  text-align:left;
  vertical-align:top;
  padding:14px;
  border-bottom:1px solid var(--line)
}
th {
  background:#edf4df
}
th small,td small {
  display:block;
  color:var(--muted);
  font-weight:400
}
.plan-description {
  min-width:260px
}
.standard {
  background:#f0f7e3
}
.rates article {
  padding:18px 0;
  border-bottom:1px solid var(--line)
}
.rates .policy {
  max-width:85ch
}
.rates .policy p {
  margin-top:15px
}
.rates .currency {
  font-weight:700
}
tr {
  break-inside:avoid
}
thead {
  display:table-header-group
}
@media(max-width:1050px) {
  .workspace {
    grid-template-columns:1fr
  }
  .summary-panel {
    position:static
  }
  .summary-panel .export-actions {
    flex-direction:row
  }
  .export-actions button {
    width:auto
  }
  .validation {
    max-height:none
  }
}
@media(max-width:600px) {
  .wrap {
    width:calc(100% - 28px)
  }
  .hero {
    padding-top:30px
  }
  .grid {
    grid-template-columns:1fr
  }
  fieldset,details.section {
    padding:16px
  }
  .subcard {
    padding:12px
  }
  .nav {
    gap:6px
  }
  .saved {
    align-items:stretch
  }
  .saved label {
    width:100%
  }
  .toolbar>* {
    flex:1 1 145px
  }
  .sum-lines li {
    flex-wrap:wrap
  }
  .duration-row .field {
    width:90px
  }
  .rates th,.rates td {
    padding:10px
  }
  .table-wrap {
    font-size:14px
  }
}
@page {
  size:A4 portrait;
  margin:14mm
}
@media print {
  .site-head,body:not(.rates-page) .toolbar {
    display:none
  }
  .wrap {
    width:100%
  }
  .rates {
    max-width:none
  }
  body {
    background:white;
    font-size:11px
  }
  .table-wrap {
    overflow:visible
  }
  table {
    font-size:10px
  }
  th,td {
    padding:7px
  }
  .hero {
    padding-top:0
  }
  h1 {
    font-size:25px
  }
  .rates article {
    break-inside:avoid
  }
}

.rate-contact { padding: 26px; background: var(--lime); border-radius: 16px; }
.rate-contact p { margin: 10px 0; }
.rate-contact a { display: inline-block; min-height: 46px; padding: 9px 16px; border: 1px solid var(--green); border-radius: 8px; background: var(--white); font-weight: 700; }
.rate-footer { padding: 24px 0; margin-top: 36px; border-top: 1px solid var(--line); }
