/* ITALK printed documents (certificates, payment slips): one A4 sheet in the Ink & Amber style.
   The paper is always white, in light and dark mode alike, so these colours are fixed. */
.a4, .a4 * { box-sizing: border-box; margin: 0; padding: 0; }
.a4 {
  --d-ink: #15130e; --d-ink-2: #665d50; --d-ink-3: #978d7e; --d-line: #e8e2d6; --d-soft: #f7f4ee;
  --d-amber: #ffc23d; --d-amber-soft: #fff6dd; --d-amber-text: #8a6300;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 13.5px; line-height: 1.55; letter-spacing: normal; color: var(--d-ink);
  width: 210mm; min-height: 297mm; margin: 0 auto 40px; flex: none;
  background: #fff; padding: 14mm 18mm 12mm;
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, .25);
  display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.a4 tbody tr:hover td { background: transparent; }
.a4::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--d-amber); }

/* Letterhead */
.a4 .d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--d-line); }
.a4 .d-brand { display: flex; align-items: center; gap: 10px; }
.a4 .d-brand .icon { width: 32px; height: 32px; border-radius: 9px; display: block; }
.a4 .d-brand .word { height: 14px; width: auto; display: block; }
.a4 .d-brand small { display: block; font-size: 10.5px; line-height: 14px; color: var(--d-ink-2); font-weight: 600; margin-top: 3px; letter-spacing: .2px; }
.a4 .d-meta { display: grid; grid-template-columns: auto auto; column-gap: 12px; row-gap: 2px; font-size: 11px; line-height: 16px; text-align: right; }
.a4 .d-meta dt { color: var(--d-ink-3); font-weight: 600; }
.a4 .d-meta dd { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Title */
.a4 .d-title { margin-top: 22px; }
.a4 .d-kicker { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px; border-radius: 999px; background: var(--d-amber-soft); color: var(--d-amber-text); font-size: 10.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.a4 h1 { margin-top: 12px; font-size: 30px; line-height: 36px; font-weight: 800; letter-spacing: -.6px; color: var(--d-ink); }
.a4 .d-title .ko { margin-top: 2px; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--d-ink-2); letter-spacing: 2px; }

/* Sections + data rows */
.a4 .d-sec { margin-top: 20px; }
.a4 .d-sec-h { display: flex; align-items: baseline; gap: 8px; padding-bottom: 8px; border-bottom: 1.5px solid var(--d-ink); font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.a4 .d-sec-h span { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--d-ink-2); }
.a4 table.d-rows { width: 100%; border-collapse: collapse; }
.a4 table.d-rows th, .a4 table.d-rows td { padding: 7px 0; border-bottom: 1px solid var(--d-line); text-align: left; vertical-align: top; }
.a4 table.d-rows th { width: 42%; padding-right: 16px; font-size: 12px; font-weight: 600; color: var(--d-ink-2); }
.a4 table.d-rows th span { color: var(--d-ink-3); font-weight: 500; }
.a4 table.d-rows td { font-size: 13.5px; font-weight: 700; color: var(--d-ink); overflow-wrap: anywhere; }
.a4 table.d-rows .num { text-align: right; font-variant-numeric: tabular-nums; }
.a4 table.d-rows tr.total th, .a4 table.d-rows tr.total td { border-bottom: 0; border-top: 1.5px solid var(--d-ink); padding-top: 12px; font-size: 15px; font-weight: 800; color: var(--d-ink); }
.a4 table.d-rows tr.note td { font-size: 12px; font-weight: 500; color: var(--d-ink-2); }

/* Statement */
.a4 .d-statement { margin-top: 22px; padding: 14px 18px; border-left: 4px solid var(--d-amber); background: var(--d-soft); border-radius: 0 10px 10px 0; }
.a4 .d-statement p { font-size: 14px; line-height: 21px; font-weight: 700; }
.a4 .d-statement p.ko { margin-top: 4px; font-size: 12.5px; line-height: 19px; font-weight: 500; color: var(--d-ink-2); }

/* Letter body (certificate after leaving) */
.a4 .d-letter { margin-top: 20px; font-size: 13px; line-height: 1.75; text-align: justify; }
.a4 .d-letter p + p { margin-top: 10px; }
.a4 .d-letter ol { margin: 8px 0 8px 22px; }
.a4 .d-letter ol li { margin: 2px 0; }

/* Issuer */
.a4 .d-issuer { margin-top: 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.a4 .d-issuer .d-when { font-size: 12px; color: var(--d-ink-2); }
.a4 .d-issuer .d-when b { display: block; margin-top: 2px; font-size: 14px; color: var(--d-ink); font-variant-numeric: tabular-nums; }
.a4 .d-issuer .d-who { text-align: right; font-size: 12px; color: var(--d-ink-2); line-height: 18px; }
.a4 .d-issuer .d-who b { display: block; font-size: 16px; line-height: 22px; font-weight: 800; color: var(--d-ink); letter-spacing: .2px; }
.a4 .d-issuer .d-who .nm { display: block; margin-top: 2px; font-weight: 700; color: var(--d-ink); font-size: 13px; }

/* "Computer-generated, no signature or seal needed" */
.a4 .d-egov { margin-top: 16px; display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--d-line); border-radius: 12px; background: #fff; }
.a4 .d-egov .ico { width: 34px; height: 34px; border-radius: 50%; background: var(--d-amber); color: var(--d-ink); display: grid; place-items: center; flex: none; }
.a4 .d-egov .ico svg { width: 20px; height: 20px; display: block; }
.a4 .d-egov b { display: block; font-size: 13px; line-height: 18px; font-weight: 800; }
.a4 .d-egov p { margin-top: 3px; font-size: 11.5px; line-height: 17px; color: var(--d-ink-2); }
.a4 .d-egov p.ko { margin-top: 2px; }
.a4 .d-egov .chk { margin-top: 6px; font-size: 11px; line-height: 16px; color: var(--d-ink); font-weight: 600; }
.a4 .d-egov .chk code { font-family: inherit; font-weight: 800; background: var(--d-amber-soft); padding: 1px 6px; border-radius: 4px; }

/* Footer: company details, pinned to the bottom of the sheet */
.a4 .d-foot { margin-top: auto; padding-top: 16px; }
.a4 .d-foot-in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; padding-top: 12px; border-top: 1px solid var(--d-line); font-size: 10.5px; line-height: 15px; color: var(--d-ink-2); }
.a4 .d-foot-in b { display: block; font-size: 9.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--d-ink-3); font-weight: 700; }
.a4 .d-foot-in .wide { grid-column: span 2; }

@media print {
  .a4 { box-shadow: none; margin: 0; width: auto; min-height: 297mm; }
}
@page { size: A4; margin: 0; }
