/*
 * 「初」表示 先行性スクリーニング
 * 審査書類テーマ：藍鉄 #1E3A5C／真鍮 #9A7B3F／生成り #F2EDE4
 * すべてのクラスに teikoku-first- を前置し、テーマ側CSSとの衝突を避ける。
 */

.teikoku-first {
	--tfc-ink: #1E3A5C;
	--tfc-ink-weak: #3d5a7a;
	--tfc-brass: #9A7B3F;
	--tfc-paper: #F2EDE4;
	--tfc-paper-deep: #e6ded0;
	--tfc-line: #cdbfa8;
	--tfc-text: #23292f;
	--tfc-muted: #6a7280;
	--tfc-danger: #9d2f2f;
	--tfc-warn: #a2691d;
	--tfc-ok: #2f6b4f;

	max-width: 860px;
	margin: 0 auto;
	padding: 0;
	color: var(--tfc-text);
	font-size: 16px;
	line-height: 1.85;
	background: var(--tfc-paper);
	border: 1px solid var(--tfc-line);
	border-top: 4px solid var(--tfc-ink);
	box-sizing: border-box;
}

.teikoku-first *,
.teikoku-first *::before,
.teikoku-first *::after {
	box-sizing: border-box;
}

/*
 * display 指定を持つ要素は hidden 属性だけでは隠れないため明示する。
 * （.teikoku-first__steps は display:flex を持つ）
 */
.teikoku-first [hidden] {
	display: none !important;
}

/* ---------- ヘッダー ---------- */

.teikoku-first__header {
	padding: 32px 32px 20px;
	border-bottom: 1px solid var(--tfc-line);
}

.teikoku-first__eyebrow {
	margin: 0 0 10px;
	font-size: 12px;
	letter-spacing: 0.14em;
	color: var(--tfc-brass);
	font-weight: 700;
}

.teikoku-first__title {
	margin: 0 0 10px;
	font-family: "Noto Serif JP", "Yu Mincho", "YuMincho", serif;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.45;
	color: var(--tfc-ink);
	letter-spacing: 0.02em;
}

.teikoku-first__subtitle {
	margin: 0;
	font-size: 14px;
	color: var(--tfc-muted);
	line-height: 1.8;
}

/* ---------- 注意書き ---------- */

.teikoku-first__notice {
	margin: 24px 32px 0;
	padding: 16px 18px;
	background: #fff;
	border-left: 3px solid var(--tfc-brass);
	font-size: 13px;
	line-height: 1.8;
}

.teikoku-first__notice p {
	margin: 0 0 6px;
}

.teikoku-first__notice p:last-child {
	margin-bottom: 0;
	color: var(--tfc-muted);
}

/* ---------- URL自動入力 ---------- */

.teikoku-first__autofill {
	margin-bottom: 30px;
	padding: 20px 22px;
	background: #fff;
	border: 1px solid var(--tfc-line);
	border-left: 4px solid var(--tfc-brass);
}

.teikoku-first__autofill-title {
	margin: 0 0 6px;
	font-family: "Noto Serif JP", "Yu Mincho", serif;
	font-size: 16px;
	font-weight: 700;
	color: var(--tfc-ink);
}

.teikoku-first__autofill-lead {
	margin: 0 0 14px;
	font-size: 13px;
	line-height: 1.8;
	color: var(--tfc-muted);
}

.teikoku-first__autofill-row {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.teikoku-first__autofill-row input[type="url"] {
	flex: 1 1 auto;
	min-width: 0;
	width: auto;
	padding: 11px 13px;
	font-size: 15px;
	font-family: inherit;
	color: var(--tfc-text);
	background: #fff;
	border: 1px solid var(--tfc-line);
	border-radius: 0;
	appearance: none;
	-webkit-appearance: none;
}

.teikoku-first__autofill-row input[type="url"]:focus {
	outline: none;
	border-color: var(--tfc-ink);
	box-shadow: 0 0 0 2px rgba(30, 58, 92, 0.12);
}

.teikoku-first__autofill-row .teikoku-first__btn {
	flex: 0 0 auto;
	padding: 11px 22px;
	font-size: 14px;
	white-space: nowrap;
}

.teikoku-first__autofill-status {
	margin-top: 14px;
	padding: 14px 16px;
	font-size: 13px;
	line-height: 1.85;
	background: var(--tfc-paper);
	border-left: 3px solid var(--tfc-line);
}

.teikoku-first__autofill-status p {
	margin: 0 0 8px;
}

.teikoku-first__autofill-status p:last-child {
	margin-bottom: 0;
}

.teikoku-first__autofill-status.is-loading { border-left-color: var(--tfc-brass); color: var(--tfc-muted); }
.teikoku-first__autofill-status.is-done { border-left-color: var(--tfc-ok); }
.teikoku-first__autofill-status.is-alert { border-left-color: var(--tfc-warn); background: #fdf8ef; }
.teikoku-first__autofill-status.is-error { border-left-color: var(--tfc-danger); background: #fdf6f6; color: var(--tfc-danger); }

.teikoku-first__autofill-alert {
	font-weight: 700;
	color: var(--tfc-warn);
}

.teikoku-first__autofill-ok {
	font-weight: 700;
	color: var(--tfc-ok);
}

.teikoku-first__autofill-claims {
	margin: 0 0 10px;
	padding: 0;
	list-style: none;
}

.teikoku-first__autofill-claims li {
	margin-bottom: 6px;
	padding: 9px 12px;
	font-family: "Noto Serif JP", "Yu Mincho", serif;
	font-size: 14px;
	line-height: 1.7;
	color: var(--tfc-ink);
	background: #fff;
	border: 1px solid var(--tfc-line);
}

.teikoku-first__autofill-filled,
.teikoku-first__autofill-note {
	font-size: 12px;
	color: var(--tfc-muted);
}

.teikoku-first__autofill-warn {
	padding-top: 8px;
	font-size: 12px;
	color: var(--tfc-muted);
	border-top: 1px dashed var(--tfc-line);
}

@media (max-width: 640px) {
	.teikoku-first__autofill-row {
		flex-direction: column;
	}

	.teikoku-first__autofill-row .teikoku-first__btn {
		width: 100%;
	}
}

/* ---------- ステップ表示 ---------- */


.teikoku-first__steps {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 24px 32px 0;
	font-size: 12px;
}

.teikoku-first__step {
	flex: 1 1 auto;
	padding: 7px 4px;
	text-align: center;
	color: var(--tfc-muted);
	background: var(--tfc-paper-deep);
	border-bottom: 2px solid transparent;
	white-space: nowrap;
}

.teikoku-first__step.is-active {
	color: #fff;
	background: var(--tfc-ink);
	border-bottom-color: var(--tfc-brass);
	font-weight: 700;
}

.teikoku-first__step.is-done {
	color: var(--tfc-ink);
	background: #fff;
	border-bottom-color: var(--tfc-line);
}

/* ---------- フォーム ---------- */

.teikoku-first__form {
	padding: 0 32px 32px;
}

.teikoku-first__panel {
	display: none;
	padding-top: 24px;
}

.teikoku-first__panel.is-active {
	display: block;
}

.teikoku-first__panel-title {
	margin: 0 0 20px;
	padding-bottom: 10px;
	font-family: "Noto Serif JP", "Yu Mincho", serif;
	font-size: 18px;
	font-weight: 700;
	color: var(--tfc-ink);
	border-bottom: 1px solid var(--tfc-line);
}

.teikoku-first__field {
	margin-bottom: 22px;
}

.teikoku-first__field > label,
.teikoku-first__label {
	display: block;
	margin-bottom: 7px;
	font-size: 14px;
	font-weight: 700;
	color: var(--tfc-ink);
}

.teikoku-first__req {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 7px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: #fff;
	background: var(--tfc-brass);
	vertical-align: 2px;
}

.teikoku-first input[type="text"],
.teikoku-first input[type="email"],
.teikoku-first select,
.teikoku-first textarea {
	width: 100%;
	padding: 11px 13px;
	font-size: 15px;
	font-family: inherit;
	line-height: 1.7;
	color: var(--tfc-text);
	background: #fff;
	border: 1px solid var(--tfc-line);
	border-radius: 0;
	appearance: none;
	-webkit-appearance: none;
}

.teikoku-first select {
	background-image: linear-gradient(45deg, transparent 50%, var(--tfc-ink) 50%), linear-gradient(135deg, var(--tfc-ink) 50%, transparent 50%);
	background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 36px;
}

.teikoku-first input:focus,
.teikoku-first select:focus,
.teikoku-first textarea:focus {
	outline: none;
	border-color: var(--tfc-ink);
	box-shadow: 0 0 0 2px rgba(30, 58, 92, 0.12);
}

.teikoku-first input.is-invalid,
.teikoku-first textarea.is-invalid {
	border-color: var(--tfc-danger);
	background: #fdf6f6;
}

.teikoku-first textarea {
	resize: vertical;
	min-height: 120px;
}

.teikoku-first__hint {
	margin: 7px 0 0;
	font-size: 12px;
	line-height: 1.7;
	color: var(--tfc-muted);
}

.teikoku-first__hint--center {
	text-align: center;
	margin-top: 14px;
}

.teikoku-first__checks {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.teikoku-first__check {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 13px;
	font-size: 13px;
	background: #fff;
	border: 1px solid var(--tfc-line);
	cursor: pointer;
}

.teikoku-first__check input {
	margin: 0;
}

.teikoku-first__check:has(input:checked) {
	border-color: var(--tfc-ink);
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--tfc-ink);
	font-weight: 700;
	color: var(--tfc-ink);
}

.teikoku-first__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.teikoku-first__consent {
	margin: 0 0 20px;
	font-size: 12px;
	line-height: 1.8;
	color: var(--tfc-muted);
}

.teikoku-first__consent a {
	color: var(--tfc-ink);
}

/* ---------- ボタン ---------- */

.teikoku-first__nav {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 28px;
}

.teikoku-first__btn {
	padding: 13px 28px;
	font-size: 15px;
	font-family: inherit;
	font-weight: 700;
	color: var(--tfc-ink);
	background: #fff;
	border: 1px solid var(--tfc-ink);
	border-radius: 0;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.teikoku-first__btn:hover {
	opacity: 0.82;
}

.teikoku-first__btn--primary {
	color: #fff;
	background: var(--tfc-ink);
}

.teikoku-first__btn--brass {
	color: #fff;
	background: var(--tfc-brass);
	border-color: var(--tfc-brass);
}

.teikoku-first__btn[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
}

/* ---------- エラー ---------- */

.teikoku-first__error {
	margin: 0 32px 24px;
	padding: 14px 18px;
	font-size: 14px;
	line-height: 1.8;
	color: var(--tfc-danger);
	background: #fdf6f6;
	border-left: 3px solid var(--tfc-danger);
}

/* ---------- 進捗 ---------- */

.teikoku-first__progress {
	padding: 48px 32px 56px;
	text-align: center;
}

.teikoku-first__ring {
	position: relative;
	width: 130px;
	height: 130px;
	margin: 0 auto 22px;
}

.teikoku-first__ring svg {
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}

.teikoku-first__ring-bg {
	fill: none;
	stroke: var(--tfc-paper-deep);
	stroke-width: 7;
}

.teikoku-first__ring-fg {
	fill: none;
	stroke: var(--tfc-brass);
	stroke-width: 7;
	stroke-linecap: butt;
	stroke-dasharray: 326.7;
	stroke-dashoffset: 326.7;
	transition: stroke-dashoffset 0.4s linear;
}

.teikoku-first__ring-num {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-family: "Noto Serif JP", serif;
	font-size: 26px;
	font-weight: 700;
	color: var(--tfc-ink);
}

.teikoku-first__progress-step {
	margin: 0 0 6px;
	font-size: 15px;
	color: var(--tfc-ink);
	font-weight: 700;
}

.teikoku-first__progress-time {
	margin: 0;
	font-size: 12px;
	color: var(--tfc-muted);
}

/* ---------- 結果 ---------- */

.teikoku-first__result {
	padding: 0 32px 36px;
}

.teikoku-first__verdict {
	margin: 28px 0 0;
	padding: 24px 26px;
	background: #fff;
	border: 1px solid var(--tfc-line);
	border-left-width: 5px;
}

.teikoku-first__verdict--blocked { border-left-color: var(--tfc-danger); }
.teikoku-first__verdict--narrow { border-left-color: var(--tfc-warn); }
.teikoku-first__verdict--conditional { border-left-color: var(--tfc-ok); }
.teikoku-first__verdict--insufficient { border-left-color: var(--tfc-muted); }

.teikoku-first__verdict-label {
	display: block;
	margin: 0 0 8px;
	font-size: 12px;
	letter-spacing: 0.12em;
	color: var(--tfc-muted);
}

.teikoku-first__verdict-head {
	margin: 0 0 12px;
	font-family: "Noto Serif JP", "Yu Mincho", serif;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.5;
	color: var(--tfc-ink);
}

.teikoku-first__verdict--blocked .teikoku-first__verdict-head { color: var(--tfc-danger); }
.teikoku-first__verdict--narrow .teikoku-first__verdict-head { color: var(--tfc-warn); }
.teikoku-first__verdict--conditional .teikoku-first__verdict-head { color: var(--tfc-ok); }

.teikoku-first__verdict-body {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.9;
}

.teikoku-first__meter {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 12px;
	color: var(--tfc-muted);
}

.teikoku-first__meter-bar {
	flex: 1;
	height: 5px;
	background: var(--tfc-paper-deep);
}

.teikoku-first__meter-fill {
	height: 100%;
	background: var(--tfc-brass);
}

.teikoku-first__section {
	margin-top: 30px;
}

.teikoku-first__section-title {
	margin: 0 0 14px;
	padding-left: 12px;
	font-family: "Noto Serif JP", "Yu Mincho", serif;
	font-size: 16px;
	font-weight: 700;
	color: var(--tfc-ink);
	border-left: 3px solid var(--tfc-brass);
	line-height: 1.5;
}

.teikoku-first__scope {
	padding: 18px 20px;
	background: #fff;
	border: 1px solid var(--tfc-line);
	font-size: 15px;
	line-height: 1.85;
}

.teikoku-first__scope strong {
	color: var(--tfc-ink);
}

.teikoku-first__scope del {
	color: var(--tfc-muted);
	text-decoration-color: var(--tfc-danger);
}

.teikoku-first__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	background: #fff;
}

.teikoku-first__table th,
.teikoku-first__table td {
	padding: 10px 12px;
	border: 1px solid var(--tfc-line);
	text-align: left;
	vertical-align: top;
	line-height: 1.75;
}

.teikoku-first__table th {
	background: var(--tfc-paper-deep);
	color: var(--tfc-ink);
	font-weight: 700;
	white-space: nowrap;
}

.teikoku-first__pill {
	display: inline-block;
	padding: 2px 9px;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
	color: #fff;
}

.teikoku-first__pill--difficult,
.teikoku-first__pill--high { background: var(--tfc-danger); }
.teikoku-first__pill--verify,
.teikoku-first__pill--medium { background: var(--tfc-warn); }
.teikoku-first__pill--feasible,
.teikoku-first__pill--low { background: var(--tfc-ok); }

.teikoku-first__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.teikoku-first__list li {
	position: relative;
	margin-bottom: 9px;
	padding: 11px 14px 11px 34px;
	font-size: 14px;
	line-height: 1.8;
	background: #fff;
	border: 1px solid var(--tfc-line);
}

.teikoku-first__list li::before {
	content: "";
	position: absolute;
	left: 14px;
	top: 19px;
	width: 7px;
	height: 7px;
	background: var(--tfc-brass);
}

.teikoku-first__wording {
	margin-bottom: 14px;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--tfc-line);
}

.teikoku-first__wording-phrase {
	margin: 0 0 8px;
	font-family: "Noto Serif JP", "Yu Mincho", serif;
	font-size: 16px;
	font-weight: 700;
	color: var(--tfc-ink);
	line-height: 1.6;
}

.teikoku-first__wording-note {
	margin: 0 0 8px;
	padding: 9px 12px;
	font-size: 12px;
	line-height: 1.8;
	color: var(--tfc-text);
	background: var(--tfc-paper);
	border-left: 2px solid var(--tfc-brass);
}

.teikoku-first__wording-why {
	margin: 0;
	font-size: 13px;
	line-height: 1.8;
	color: var(--tfc-muted);
}

.teikoku-first__candidate {
	margin-bottom: 12px;
	padding: 15px 17px;
	background: #fff;
	border: 1px solid var(--tfc-line);
	border-left-width: 4px;
}

.teikoku-first__candidate--high { border-left-color: var(--tfc-danger); }
.teikoku-first__candidate--medium { border-left-color: var(--tfc-warn); }
.teikoku-first__candidate--low { border-left-color: var(--tfc-line); }

.teikoku-first__candidate-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 9px;
	margin-bottom: 7px;
}

.teikoku-first__candidate-name {
	font-size: 15px;
	font-weight: 700;
	color: var(--tfc-ink);
}

.teikoku-first__candidate-meta {
	font-size: 12px;
	color: var(--tfc-muted);
}

.teikoku-first__candidate-desc,
.teikoku-first__candidate-impact {
	margin: 0 0 6px;
	font-size: 13px;
	line-height: 1.8;
}

.teikoku-first__candidate-impact {
	color: var(--tfc-danger);
}

.teikoku-first__candidate a {
	font-size: 12px;
	color: var(--tfc-ink);
	word-break: break-all;
}

.teikoku-first__loading-inline {
	padding: 18px 20px;
	font-size: 13px;
	color: var(--tfc-muted);
	background: #fff;
	border: 1px dashed var(--tfc-line);
	text-align: center;
}

.teikoku-first__disclaimer {
	margin-top: 32px;
	padding: 18px 20px;
	font-size: 12px;
	line-height: 1.9;
	color: var(--tfc-muted);
	background: var(--tfc-paper-deep);
	border-top: 2px solid var(--tfc-ink);
}

.teikoku-first__disclaimer strong {
	display: block;
	margin-bottom: 6px;
	color: var(--tfc-ink);
	font-size: 13px;
}

/* ---------- CTA ---------- */

.teikoku-first__cta {
	margin-top: 32px;
	padding: 28px 26px;
	text-align: center;
	background: var(--tfc-ink);
	color: #fff;
}

.teikoku-first__cta-title {
	margin: 0 0 10px;
	font-family: "Noto Serif JP", "Yu Mincho", serif;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.6;
	color: #fff;
}

.teikoku-first__cta-body {
	margin: 0 0 20px;
	font-size: 13px;
	line-height: 1.9;
	color: rgba(255, 255, 255, 0.85);
}

.teikoku-first__cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.teikoku-first__cta-actions a {
	display: inline-block;
	padding: 13px 26px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	border: 1px solid #fff;
	color: #fff;
}

.teikoku-first__cta-actions a.is-primary {
	color: var(--tfc-ink);
	background: #fff;
}

.teikoku-first__flow {
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.8);
}

.teikoku-first__flow li::after {
	content: "›";
	margin-left: 6px;
	color: var(--tfc-brass);
}

.teikoku-first__flow li:last-child::after {
	content: "";
}

/* ---------- モバイル ---------- */

@media (max-width: 640px) {
	.teikoku-first {
		font-size: 15px;
	}

	.teikoku-first__header,
	.teikoku-first__form,
	.teikoku-first__result {
		padding-left: 18px;
		padding-right: 18px;
	}

	.teikoku-first__notice,
	.teikoku-first__error {
		margin-left: 18px;
		margin-right: 18px;
	}

	.teikoku-first__steps {
		padding-left: 18px;
		padding-right: 18px;
		font-size: 11px;
	}

	.teikoku-first__title {
		font-size: 21px;
	}

	.teikoku-first__nav {
		flex-direction: column-reverse;
	}

	.teikoku-first__btn {
		width: 100%;
	}

	.teikoku-first__table,
	.teikoku-first__table tbody,
	.teikoku-first__table tr,
	.teikoku-first__table td,
	.teikoku-first__table th {
		display: block;
		width: 100%;
	}

	.teikoku-first__table thead {
		display: none;
	}

	.teikoku-first__table tr {
		margin-bottom: 10px;
		border: 1px solid var(--tfc-line);
	}

	.teikoku-first__table td {
		border: none;
		border-bottom: 1px solid var(--tfc-paper-deep);
	}

	.teikoku-first__table td::before {
		content: attr(data-label) "：";
		display: block;
		font-size: 11px;
		font-weight: 700;
		color: var(--tfc-brass);
	}
}

@media print {
	.teikoku-first__form,
	.teikoku-first__steps,
	.teikoku-first__progress,
	.teikoku-first__cta {
		display: none !important;
	}

	.teikoku-first {
		border: none;
		background: #fff;
	}
}
